Browse files

Merge pull request #15 from svent/regex_modifier

add support for the 'm' regex modifier
  • Loading branch information...
tenderlove committed Oct 9, 2012
2 parents bdf3537 + f3bad34 commit 182a0cba05155b97d74b88a4031af20f6e5946ce
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rkelly/tokenizer.rb
@@ -99,7 +99,7 @@ def initialize(&block)
# (eg, // and //g). Here we could depend on match length and priority to
# determine that these are actually comments, but it turns out to be
# easier to not match them in the first place.
- token(:REGEXP, /\A\/(?:[^\/\r\n\\*]|\\[^\r\n])[^\/\r\n\\]*(?:\\[^\r\n][^\/\r\n\\]*)*\/[gi]*/)
+ token(:REGEXP, /\A\/(?:[^\/\r\n\\*]|\\[^\r\n])[^\/\r\n\\]*(?:\\[^\r\n][^\/\r\n\\]*)*\/[gim]*/)
token(:S, /\A[\s\r\n]*/m)
token(:SINGLE_CHAR, /\A./) do |type, value|

0 comments on commit 182a0cb

Please sign in to comment.