summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/markdown-escapes/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/markdown-escapes/index.js')
-rw-r--r--tools/node_modules/eslint/node_modules/markdown-escapes/index.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/markdown-escapes/index.js b/tools/node_modules/eslint/node_modules/markdown-escapes/index.js
new file mode 100644
index 0000000000..9e5b7739f9
--- /dev/null
+++ b/tools/node_modules/eslint/node_modules/markdown-escapes/index.js
@@ -0,0 +1,57 @@
+'use strict';
+
+module.exports = escapes;
+
+var defaults = [
+ '\\',
+ '`',
+ '*',
+ '{',
+ '}',
+ '[',
+ ']',
+ '(',
+ ')',
+ '#',
+ '+',
+ '-',
+ '.',
+ '!',
+ '_',
+ '>'
+];
+
+var gfm = defaults.concat(['~', '|']);
+
+var commonmark = gfm.concat([
+ '\n',
+ '"',
+ '$',
+ '%',
+ '&',
+ '\'',
+ ',',
+ '/',
+ ':',
+ ';',
+ '<',
+ '=',
+ '?',
+ '@',
+ '^'
+]);
+
+escapes.default = defaults;
+escapes.gfm = gfm;
+escapes.commonmark = commonmark;
+
+/* Get markdown escapes. */
+function escapes(options) {
+ var settings = options || {};
+
+ if (settings.commonmark) {
+ return commonmark;
+ }
+
+ return settings.gfm ? gfm : defaults;
+}