function html_entity_regex() {
    // A file with all html entities, should be kept up to date with
    // https://html.spec.whatwg.org/multipage/entities.json
    let html_entities = require("./html_entities.json");
    let s = '&(';
    s += Object.keys(html_entities).map(name => name.substring(1, name.length - 1)).join('|');
    s += ');';
    return new RegExp(s);
}
// Constructs a regex that matches all html entity references.
Constructs a regex that matches all html entity references.
Constructs a regex that matches all html entity references .
function html_entity_regex() {
    let html_entities = require("./html_entities.json");
    let s = '&(';
    s += Object.keys(html_entities).map(name => name.substring(1, name.length - 1)).join('|');
    s += ');';
    return new RegExp(s);
}
function html_entity_regex ( ) { let html_entities = require ( "./html_entities.json" ) ; let s = '&(' ; s += Object . keys ( html_entities ) . map ( name => name . substring ( 1 , name . length - 1 ) ) . join ( '|' ) ; s += ');' ; return new RegExp ( s ) ; }
Constructs a regex that matches all html entity references.
Constructs a regex that matches all html entity references .
// A file with all html entities, should be kept up to date with // https://html.spec.whatwg.org/multipage/entities.json