Browse Source

Do browserified output ascii-friendly

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
8a67cb3a83
  1. 2
      Makefile
  2. 2
      lib/presets/commonmark.js
  3. 2
      lib/presets/default.js
  4. 2
      lib/presets/full.js
  5. 2
      lib/renderer.js
  6. 2
      lib/rules_core/smartquotes.js

2
Makefile

@ -72,7 +72,7 @@ browserify:
browserify -r ./ -s markdownit \
) > dist/markdown-it.js
# Minify
uglifyjs dist/markdown-it.js -c -m \
uglifyjs dist/markdown-it.js -b beautify=false,ascii-only=true -c -m \
--preamble "/*! ${NPM_PACKAGE} ${NPM_VERSION} ${GITHUB_PROJ} @license MIT */" \
> dist/markdown-it.min.js

2
lib/presets/commonmark.js

@ -16,7 +16,7 @@ module.exports = {
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
quotes: '“”‘’',
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */,
// Highlighter function. Should return escaped HTML,
// or '' if input not changed

2
lib/presets/default.js

@ -16,7 +16,7 @@ module.exports = {
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
quotes: '“”‘’',
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */,
// Highlighter function. Should return escaped HTML,
// or '' if input not changed

2
lib/presets/full.js

@ -16,7 +16,7 @@ module.exports = {
// Double + single quotes replacement pairs, when typographer enabled,
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
quotes: '“”‘’',
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */,
// Highlighter function. Should return escaped HTML,
// or '' if input not changed

2
lib/renderer.js

@ -307,7 +307,7 @@ rules.footnote_anchor = function (tokens, idx) {
if (tokens[idx].subId > 0) {
id += ':' + tokens[idx].subId;
}
return ' <a href="#' + id + '" class="footnote-backref">↩</a>';
return ' <a href="#' + id + '" class="footnote-backref">\u21a9</a>'; /* ↩ */
};

2
lib/rules_core/smartquotes.js

@ -6,7 +6,7 @@
var QUOTE_TEST_RE = /['"]/;
var QUOTE_RE = /['"]/g;
var PUNCT_RE = /[-\s()\[\]]/;
var APOSTROPHE = '’';
var APOSTROPHE = '\u2019'; /* ’ */
// This function returns true if the character at `pos`
// could be inside a word.

Loading…
Cancel
Save