md-link-extractor
Version:
extract all the links from markdown files
13 lines (12 loc) • 346 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalize = normalize;
const NEWLINES_RE = /\r\n?|\n/g;
const NULL_RE = /\0/g;
function normalize(string) {
let str = string;
str = str.replace(NEWLINES_RE, '\n');
str = str.replace(NULL_RE, '\uFFFD');
return str;
}
exports.default = normalize;