Ignore commands within comments when parsing document

This commit is contained in:
Shane Kilkelly 2017-06-29 16:04:52 +01:00
parent db80f8ca1c
commit cfe51089f6

View file

@ -39,7 +39,7 @@ define [], () ->
return commands
# Ignore single letter commands since auto complete is moot then.
commandRegex: /\\([a-zA-Z][a-zA-Z]+)/
commandRegex: /^[^%]*?\\([a-zA-Z][a-zA-Z]+).*$/m
nextCommand: () ->
i = @doc.search(@commandRegex)