Skip to content

Commit

Permalink
Merge pull request #24 from streambinder/master
Browse files Browse the repository at this point in the history
Prevent specific while loop to be recognized as heredoc
  • Loading branch information
lovesegfault authored Feb 20, 2018
2 parents c66c2f8 + 9e98979 commit c1ff0d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beautysh/beautysh.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def beautify_string(self, data, path=''):
re.search(r'<<', test_record)):
in_here_doc = False
else: # not in here doc
if(re.search(r'<<-?', test_record)):
if(re.search(r'<<-?', test_record)) and not (re.search(r'done.*<<<', test_record)):
here_string = re.sub(
r'.*<<-?\s*[\'|"]?([_|\w]+)[\'|"]?.*', r'\1',
stripped_record, 1)
Expand Down

0 comments on commit c1ff0d4

Please sign in to comment.