mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
minor fixes
This commit is contained in:
parent
02faca09ba
commit
78adcf6882
1 changed files with 2 additions and 2 deletions
|
@ -292,7 +292,7 @@ def subproc_toks(line, mincol=-1, maxcol=None, lexer=None, returnline=False,
|
|||
continue
|
||||
if tok.type in LPARENS:
|
||||
lparens.append(tok.type)
|
||||
if greedy and len(lparens) > 0 and lparens[-1] == 'LPAREN':
|
||||
if greedy and len(lparens) > 0 and 'LPAREN' in lparens:
|
||||
toks.append(tok)
|
||||
if tok.type == 'RPAREN':
|
||||
lparens.pop()
|
||||
|
@ -349,7 +349,7 @@ def subproc_toks(line, mincol=-1, maxcol=None, lexer=None, returnline=False,
|
|||
end_offset = len(el)
|
||||
if len(toks) == 0:
|
||||
return # handle comment lines
|
||||
elif saw_macro:
|
||||
elif saw_macro or greedy:
|
||||
end_offset = len(toks[-1].value.rstrip()) + 1
|
||||
beg, end = toks[0].lexpos, (toks[-1].lexpos + end_offset)
|
||||
end = len(line[:end].rstrip())
|
||||
|
|
Loading…
Add table
Reference in a new issue