Skip to content

Commit 33100a0

Browse files
authored
fix regexp (#6)
1 parent a480428 commit 33100a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/erb.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def detect_magic_comment(s, enc = nil)
724724
frozen = nil
725725
s.scan(re) do
726726
comment = $+
727-
comment = $1 if comment[/-\*-\s*(.*?)\s*-*-$/]
727+
comment = $1 if comment[/-\*-\s*([^\s].*?)\s*-*-$/]
728728
case comment
729729
when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
730730
enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, ''))

0 commit comments

Comments
 (0)