We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2072e11 + da3eef6 commit fd0dbacCopy full SHA for fd0dbac
src/etc/htmldocck.py
@@ -218,7 +218,7 @@ def concat_multi_lines(f):
218
219
220
LINE_PATTERN = re.compile(r'''
221
- (?<=(?<!\S)@)(?P<negated>!?)
+ (?<=(?<!\S))(?P<invalid>!?)@(?P<negated>!?)
222
(?P<cmd>[A-Za-z]+(?:-[A-Za-z]+)*)
223
(?P<args>.*)$
224
''', re.X | re.UNICODE)
@@ -233,6 +233,16 @@ def get_commands(template):
233
234
negated = (m.group('negated') == '!')
235
cmd = m.group('cmd')
236
+ if m.group('invalid') == '!':
237
+ print_err(
238
+ lineno,
239
+ line,
240
+ 'Invalid command: `!@{0}{1}`, (help: try with `@!{1}`)'.format(
241
+ '!' if negated else '',
242
+ cmd,
243
+ ),
244
+ )
245
+ continue
246
args = m.group('args')
247
if args and not args[:1].isspace():
248
print_err(lineno, line, 'Invalid template syntax')
0 commit comments