Merge pull request #1692 from kasperpeulen/dollarfix

Allow dollar sign for inline dialects
This commit is contained in:
Robin Ward 2013-11-28 11:24:04 -08:00
commit f8acffb73c
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@
// __foo__ is reserved and not a pattern // __foo__ is reserved and not a pattern
if ( i.match( /^__.*__$/) ) if ( i.match( /^__.*__$/) )
continue; continue;
var l = i.replace( /([\\.*+?|()\[\]{}])/g, "\\$1" ) var l = i.replace( /([\\.*+?^$|()\[\]{}])/g, "\\$1" )
.replace( /\n/, "\\n" ); .replace( /\n/, "\\n" );
patterns.push( i.length === 1 ? l : "(?:" + l + ")" ); patterns.push( i.length === 1 ? l : "(?:" + l + ")" );
} }