diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2017-11-02 23:16:14 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2017-11-02 23:16:14 +0100 |
commit | 1f2367aead6b76f694041cb2688652ed70ae215a (patch) | |
tree | 2753212c91c93d61afa2d12aac85d5b3a873e52b /lib/coderay/scanners | |
parent | 1bdaeef6c43436e4984f5b96cb17618f82832225 (diff) | |
parent | e15cf96405177153e1418496a7a8e85beaa679fb (diff) | |
download | coderay-1f2367aead6b76f694041cb2688652ed70ae215a.tar.gz |
Merge branch 'master' into dsl
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/haml.rb | 2 | ||||
-rw-r--r-- | lib/coderay/scanners/java.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/haml.rb b/lib/coderay/scanners/haml.rb index 5433790..d516ba9 100644 --- a/lib/coderay/scanners/haml.rb +++ b/lib/coderay/scanners/haml.rb @@ -75,7 +75,7 @@ module Scanners tag = false - if match = scan(/%[\w:]+\/?/) + if match = scan(/%[-\w:]+\/?/) encoder.text_token match, :tag # if match = scan(/( +)(.+)/) # encoder.text_token self[1], :space diff --git a/lib/coderay/scanners/java.rb b/lib/coderay/scanners/java.rb index 962154e..982a796 100644 --- a/lib/coderay/scanners/java.rb +++ b/lib/coderay/scanners/java.rb @@ -44,7 +44,7 @@ module Scanners '"' => /[^\\"]+/, '/' => /[^\\\/]+/, } # :nodoc: - IDENT = /[a-zA-Z_][A-Za-z_0-9]*/ # :nodoc: + IDENT = RUBY_VERSION < '1.9' ? /[a-zA-Z_][A-Za-z_0-9]*/ : Regexp.new('[[[:alpha:]]_][[[:alnum:]]_]*') # :nodoc: protected |