Skip to content

Commit

Permalink
Prevent expander from searching across new lines
Browse files Browse the repository at this point in the history
This commit forces the expander to not allow expanding across new lines
to help with expanding formatted json and yaml template files.
  • Loading branch information
douglasjacobsen committed Dec 8, 2023
1 parent 772acd5 commit 0e28095
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ramble/ramble/expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ def __init__(self, in_str):
children[-1].append(cur_match)
else:
self.root.add_children(cur_match)
elif c == '\n': # Don't expand across new lines
opened = []

if len(opened) > 0:
self.root.add_children(children.pop())
Expand Down

0 comments on commit 0e28095

Please sign in to comment.