diff options
author | Baron Schwartz <xaprb@users.noreply.github.com> | 2018-09-10 04:10:53 +0300 |
---|---|---|
committer | Baron Schwartz <xaprb@users.noreply.github.com> | 2018-09-10 04:10:53 +0300 |
commit | f99d4ea437b6e1ec6db70a5611187fd0fb6efe46 (patch) | |
tree | 3815f8ffec1fa8ce9fca9e82e1b86d0f97b85bdd /static | |
parent | 8aa927e840f590908543c3cb891d50fcbc3b368f (diff) |
add smartypants
Diffstat (limited to 'static')
-rwxr-xr-x | static/js/remark.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/static/js/remark.js b/static/js/remark.js index b88613c..6799e48 100755 --- a/static/js/remark.js +++ b/static/js/remark.js @@ -1004,7 +1004,9 @@ InlineLexer.prototype.smartypants = function(text) { if (!this.options.smartypants) return text; return text // em-dashes - .replace(/--/g, '\u2014') + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') // opening singles .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') // closing singles & apostrophes @@ -1522,7 +1524,7 @@ marked.defaults = { silent: false, highlight: null, langPrefix: 'lang-', - smartypants: false, + smartypants: true, headerPrefix: '', renderer: new Renderer }; |