summaryrefslogtreecommitdiffstats
path: root/scripts/ascii-whitelist-regex.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ascii-whitelist-regex.js')
-rw-r--r--scripts/ascii-whitelist-regex.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/ascii-whitelist-regex.js b/scripts/ascii-whitelist-regex.js
new file mode 100644
index 0000000..a926986
--- /dev/null
+++ b/scripts/ascii-whitelist-regex.js
@@ -0,0 +1,11 @@
+var regenerate = require('regenerate');
+
+var regexAsciiWhitelist = regenerate()
+ // Add all ASCII symbols (not just printable ASCII).
+ .addRange(0x0, 0x7F)
+ // Remove code points listed in the first column of the overrides table.
+ // http://whatwg.org/html/tokenization.html#table-charref-overrides
+ .remove(require('../data/decode-code-points-overrides.json'))
+ .toString();
+
+module.exports = regexAsciiWhitelist;