Browse files

add support for the 'm' regex modifier

  • Loading branch information...
1 parent bdf3537 commit f3bad345b56b7942a50d7b7738b861ee1316ffae @svent svent committed Oct 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rkelly/tokenizer.rb
2 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 f3bad34

Please sign in to comment.