--- a/doc/docchecker Wed Jan 06 19:57:29 2016 +0000
+++ b/doc/docchecker Wed Jan 06 20:05:18 2016 +0000
@@ -11,11 +11,15 @@
leadingline = re.compile(r'(^\s*)(\S.*)$')
hg_backtick = re.compile(r""":hg:`[^`]*'[^`]*`""")
+hg_cramped = re.compile(r'\w:hg:`')
def check(line):
if hg_backtick.search(line):
print(line)
print("""warning: please avoid nesting ' in :hg:`...`""")
+ if hg_cramped.search(line):
+ print(line)
+ print('warning: please have a space before :hg:')
def work(file):
(llead, lline) = ('', '')
--- a/tests/test-gendoc.t Wed Jan 06 19:57:29 2016 +0000
+++ b/tests/test-gendoc.t Wed Jan 06 20:05:18 2016 +0000
@@ -32,6 +32,8 @@
% extracting documentation from de
checking for parse errors
+ Die Dateien werden dem Projektarchiv beim n\xc3\xa4chsten \xc3\x9cbernehmen (commit) hinzugef\xc3\xbcgt. Um dies vorher r\xc3\xbcckg\xc3\xa4ngig zu machen, siehe:hg:`forget`. (esc)
+ warning: please have a space before :hg:
% extracting documentation from el
checking for parse errors