Преглед изворни кода

Ignore commands within comments when parsing document

Shane Kilkelly пре 9 година
родитељ
комит
cfe51089f6

+ 1 - 1
services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/SuggestionManager.coffee

@@ -39,7 +39,7 @@ define [], () ->
 			return commands
 			return commands
 
 
 		# Ignore single letter commands since auto complete is moot then.
 		# 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: () ->
 		nextCommand: () ->
 			i = @doc.search(@commandRegex)
 			i = @doc.search(@commandRegex)