Skip to content

Commit 6cccadd

Browse files
authored
Close macro match on space if no arguments (#83)
1 parent e3b8b30 commit 6cccadd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

macros.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ func getMacroMatches(input string, name string) ([][]string, error) {
173173
if argStart == 0 {
174174
argStart = idx + 1
175175
}
176+
case ' ':
177+
// when we are inside an argument, we do not want to exit on space
178+
if argStart != 0 {
179+
continue
180+
}
181+
fallthrough
176182
case ')':
177183
l := len(cache)
178184
if l == 0 {

0 commit comments

Comments
 (0)