summaryrefslogtreecommitdiffstats
path: root/scripts/ascii-whitelist-regex.js
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2014-05-24 17:35:01 +0200
committerMathias Bynens <mathias@qiwi.be>2014-05-24 20:29:40 +0200
commit65f5b4904fb0c04818c1ed86735999f7dbf07b2b (patch)
treeacf9f51f8dfe6d1ea7f50ac32966b4f43183463b /scripts/ascii-whitelist-regex.js
parent31bc08bb9af3a0d51c5326ec5e00fa4fef875d05 (diff)
downloadhe-65f5b4904fb0c04818c1ed86735999f7dbf07b2b.zip
he-65f5b4904fb0c04818c1ed86735999f7dbf07b2b.tar.gz
he-65f5b4904fb0c04818c1ed86735999f7dbf07b2b.tar.bz2
Split scripts into separate files per exported value
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;