Skip to content

Commit 47c4ab7

Browse files
committed
cimplify heredoc regex
1 parent adf4837 commit 47c4ab7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bashly/extensions/array.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def indent(offset)
1010
heredoc_marker = nil if /^#{heredoc_marker}\n?$/.match?(line)
1111
line
1212
else
13-
heredoc_marker = $1 if line =~ /<<-?\s*(\w[\w\d]*)/
13+
heredoc_marker = $1 if line =~ /<<-?\s*(\w+)/
1414
"#{indentation}#{line}"
1515
end
1616
end

0 commit comments

Comments
 (0)