aboutsummaryrefslogtreecommitdiff
path: root/node_modules/markdown-it/lib/rules_inline/text.js
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:43:05 +0800
committerruki <waruqi@gmail.com>2018-11-07 22:18:30 +0800
commit89e95b3f143682ed9a006991bacf45c9dcba4818 (patch)
tree4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/markdown-it/lib/rules_inline/text.js
parentaa7f0199255277949790b41c56e8ec97dd4f0da4 (diff)
downloadxmake-docs-vuepress.tar.gz
xmake-docs-vuepress.zip
remove node_modulesvuepress
Diffstat (limited to 'node_modules/markdown-it/lib/rules_inline/text.js')
-rw-r--r--node_modules/markdown-it/lib/rules_inline/text.js89
1 files changed, 0 insertions, 89 deletions
diff --git a/node_modules/markdown-it/lib/rules_inline/text.js b/node_modules/markdown-it/lib/rules_inline/text.js
deleted file mode 100644
index b19591e1..00000000
--- a/node_modules/markdown-it/lib/rules_inline/text.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Skip text characters for text token, place those to pending buffer
-// and increment current pos
-
-'use strict';
-
-
-// Rule to skip pure text
-// '{}$%@~+=:' reserved for extentions
-
-// !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, _, `, {, |, }, or ~
-
-// !!!! Don't confuse with "Markdown ASCII Punctuation" chars
-// http://spec.commonmark.org/0.15/#ascii-punctuation-character
-function isTerminatorChar(ch) {
- switch (ch) {
- case 0x0A/* \n */:
- case 0x21/* ! */:
- case 0x23/* # */:
- case 0x24/* $ */:
- case 0x25/* % */:
- case 0x26/* & */:
- case 0x2A/* * */:
- case 0x2B/* + */:
- case 0x2D/* - */:
- case 0x3A/* : */:
- case 0x3C/* < */:
- case 0x3D/* = */:
- case 0x3E/* > */:
- case 0x40/* @ */:
- case 0x5B/* [ */:
- case 0x5C/* \ */:
- case 0x5D/* ] */:
- case 0x5E/* ^ */:
- case 0x5F/* _ */:
- case 0x60/* ` */:
- case 0x7B/* { */:
- case 0x7D/* } */:
- case 0x7E/* ~ */:
- return true;
- default:
- return false;
- }
-}
-
-module.exports = function text(state, silent) {
- var pos = state.pos;
-
- while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {
- pos++;
- }
-
- if (pos === state.pos) { return false; }
-
- if (!silent) { state.pending += state.src.slice(state.pos, pos); }
-
- state.pos = pos;
-
- return true;
-};
-
-// Alternative implementation, for memory.
-//
-// It costs 10% of performance, but allows extend terminators list, if place it
-// to `ParcerInline` property. Probably, will switch to it sometime, such
-// flexibility required.
-
-/*
-var TERMINATOR_RE = /[\n!#$%&*+\-:<=>@[\\\]^_`{}~]/;
-
-module.exports = function text(state, silent) {
- var pos = state.pos,
- idx = state.src.slice(pos).search(TERMINATOR_RE);
-
- // first char is terminator -> empty text
- if (idx === 0) { return false; }
-
- // no terminator -> text till end of string
- if (idx < 0) {
- if (!silent) { state.pending += state.src.slice(pos); }
- state.pos = state.src.length;
- return true;
- }
-
- if (!silent) { state.pending += state.src.slice(pos, pos + idx); }
-
- state.pos += idx;
-
- return true;
-};*/