From 4f511a131138c8c6158d66cd14c115b4547dc54a Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 27 Feb 2012 15:51:15 +0100 Subject: [PATCH] Add automated checking for non-escaped -- This checks to see if any man output has [em] in it, as that will not be correctly show in ASCII. Unfortunately the check will depend on whether the other man check is done, but I didn't want to introduce yet another short script for this (can be done, no issue). Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- autotools/check-man | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autotools/check-man b/autotools/check-man index f52415de5..11205fd3a 100755 --- a/autotools/check-man +++ b/autotools/check-man @@ -1,7 +1,7 @@ #!/bin/bash # -# Copyright (C) 2010 Google Inc. +# Copyright (C) 2010, 2012 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,3 +24,6 @@ set -e man --warnings --encoding=utf8 --local-file "$1" 2>&1 >/dev/null | \ grep -v -e "cannot adjust line" -e "can't break line" | \ grep . + +! grep -F -q '\[em]' "$1" || \ + { echo "Unescaped dashes found in $1, use \\-- instead of --" 1>&2; exit 1; } -- GitLab