Browse files

look for regexes

  • Loading branch information...
1 parent 9145201 commit 8ec59940a1cf322472294e02aa93d1833a504ee3 Steve Howell committed Jan 12, 2012
Showing with 12 additions and 3 deletions.
  1. +2 −2 cs_js_source_mapping.coffee
  2. +10 −1 test/test.json
View
4 cs_js_source_mapping.coffee
@@ -60,8 +60,8 @@ get_line_matcher = (line) ->
s = s.replace "->", "{"
return (line) -> line.indexOf(s) > 0
- # strings
- matches = line.match /"[^"]+?"|'[^']+?'/g
+ # strings | regexes
+ matches = line.match /"[^"]+?"|'[^']+?'|\/[^\/]+?\//g
if matches
for str in matches
if str.length >= 5
View
11 test/test.json
@@ -32,6 +32,7 @@
"35": 58,
"36": 59,
"37": 60,
+ "38": 64,
"39": 65,
"41": 67,
"43": 73,
@@ -65,7 +66,7 @@
"82": 136,
"84": 140,
"85": 140,
- "87": 141,
+ "86": 141,
"89": 143,
"90": 144,
"91": 146,
@@ -134,6 +135,7 @@
"197": 314,
"198": 317,
"200": 319,
+ "201": 323,
"202": 324,
"207": 331,
"209": 336,
@@ -324,6 +326,7 @@
"598": 1013,
"599": 1014,
"600": 1015,
+ "601": 1020,
"603": 1022,
"604": 1023,
"605": 1024,
@@ -355,6 +358,7 @@
"641": 1089,
"642": 1091,
"643": 1092,
+ "644": 1094,
"645": 1095,
"648": 1105,
"649": 1105,
@@ -392,6 +396,7 @@
"2": 10,
"3": 12,
"4": 12,
+ "5": 14,
"9": 21,
"10": 21,
"12": 31,
@@ -2124,6 +2129,7 @@
"1885": 2494,
"1886": 2494,
"1887": 2495,
+ "1888": 2496,
"1890": 2501
},
"rosetta_crawl.coffee": {
@@ -2136,6 +2142,9 @@
"7": 11,
"8": 13,
"12": 14,
+ "23": 17,
+ "24": 18,
+ "25": 19,
"27": 23,
"28": 23,
"51": 25,

0 comments on commit 8ec5994

Please sign in to comment.