MCPcopy Create free account
hub / github.com/witheve/Eve / getInverseReplacer

Function getInverseReplacer

src/commonmark.js:2996–3012  ·  view source on GitHub ↗
(inverse)

Source from the content-addressed store, hash-verified

2994}
2995
2996function getInverseReplacer(inverse){
2997 var single = [],
2998 multiple = [];
2999
3000 Object.keys(inverse).forEach(function(k){
3001 if(k.length === 1){
3002 single.push("\\" + k);
3003 } else {
3004 multiple.push(k);
3005 }
3006 });
3007
3008 //TODO add ranges
3009 multiple.unshift("[" + single.join("") + "]");
3010
3011 return new RegExp(multiple.join("|"), "g");
3012}
3013
3014var re_nonASCII = /[^\0-\x7F]/g,
3015 re_astralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;

Callers 1

commonmark.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected