Skip to content
Snippets Groups Projects
Commit 4f511a13 authored by Iustin Pop's avatar Iustin Pop
Browse files

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: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent f624fa95
No related branches found
No related tags found
No related merge requests found
#!/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; }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment