mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 604279: Handle spacing in front of define and endef when inside a define block. r=ted a=NPOTB
This commit is contained in:
parent
a5a776d55d
commit
ec0f0943fa
@ -233,7 +233,7 @@ def itercommandchars(d, offset, tokenlist, it):
|
||||
|
||||
yield s[offset:d.lend].replace('\n\t', '\n'), None, None, None
|
||||
|
||||
_redefines = re.compile('define|endef')
|
||||
_redefines = re.compile('\s*define|\s*endef')
|
||||
def iterdefinelines(it, startloc):
|
||||
"""
|
||||
Process the insides of a define. Most characters are included literally. Escaped newlines are treated
|
||||
@ -246,7 +246,7 @@ def iterdefinelines(it, startloc):
|
||||
for d in it:
|
||||
m = _redefines.match(d.s, d.lstart, d.lend)
|
||||
if m is not None:
|
||||
directive = m.group(0)
|
||||
directive = m.group(0).strip()
|
||||
if directive == 'endef':
|
||||
definecount -= 1
|
||||
if definecount == 0:
|
||||
|
@ -50,6 +50,16 @@ value \
|
||||
endef
|
||||
endef
|
||||
|
||||
# Test ridiculous spacing
|
||||
define TEST10
|
||||
define TEST11
|
||||
baz
|
||||
endef
|
||||
define TEST12
|
||||
foo
|
||||
endef
|
||||
endef
|
||||
|
||||
all:
|
||||
$(COMMANDS)
|
||||
$(COMMANDS2)
|
||||
|
Loading…
Reference in New Issue
Block a user