Skip to content

Commit

Permalink
ERB: Fix greedy comment matching
Browse files Browse the repository at this point in the history
Fixes #900
  • Loading branch information
ananace committed Apr 25, 2018
1 parent a58789a commit a3263e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rouge/lexers/erb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def initialize(opts={})
close = /%%>|-%>|%>/

state :root do
rule /<%#.*?%>/, Comment
rule /<%#/, Comment, :comment

rule open, Comment::Preproc, :ruby
Expand Down

0 comments on commit a3263e4

Please sign in to comment.