diff --git a/lib/rouge/lexers/php.rb b/lib/rouge/lexers/php.rb index 50ceb7dc6f..2c3d344dea 100644 --- a/lib/rouge/lexers/php.rb +++ b/lib/rouge/lexers/php.rb @@ -117,7 +117,8 @@ def self.detect?(text) end rule %r/(void|\??(int|float|bool|string|iterable|self|callable))\b/i, Keyword::Type - rule %r/[~!%^&*+=\|:.<>\/?@-]+/, Operator + rule %r/[~!%^&*+=\|:.<>\/@-]+/, Operator + rule %r/\?/, Operator rule %r/[\[\]{}();,]/, Punctuation rule %r/(class|interface|trait)(\s+)(#{nsid})/i do groups Keyword::Declaration, Text, Name::Class diff --git a/spec/visual/samples/php b/spec/visual/samples/php index 948a4a7f43..bc05852030 100644 --- a/spec/visual/samples/php +++ b/spec/visual/samples/php @@ -628,4 +628,13 @@ class Zip extends Archive { } ?> + + +

Hello world!

+ + + +

Hello world!

+ +

it's html here at the end, too.