Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial rewrite of PHP lexer #368

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix heredoc/nowdoc when ending label is not followed by a semi-colon
  • Loading branch information
julp committed Dec 21, 2016
commit b1b6d9bc9125e40bbddc5090f26a9812a849023a
2 changes: 1 addition & 1 deletion lib/rouge/lexers/php.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def self.analyze_text(text)
# - at the beginning of the line (no indentation)
# - followed by a ; then a newline even if it is the last instruction of the PHP block
state :here_and_now_doc do
rule /^(#{LABEL})(;)(?=#{NEWLINE})/ do |m|
rule /^(#{LABEL})(;?)(?=#{NEWLINE})/ do |m|
if m[1] == @label
groups Name::Constant, Punctuation
goto :in_scripting
Expand Down