Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xaprb/story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorBaron Schwartz <xaprb@users.noreply.github.com>2018-09-10 04:10:53 +0300
committerBaron Schwartz <xaprb@users.noreply.github.com>2018-09-10 04:10:53 +0300
commitf99d4ea437b6e1ec6db70a5611187fd0fb6efe46 (patch)
tree3815f8ffec1fa8ce9fca9e82e1b86d0f97b85bdd /static
parent8aa927e840f590908543c3cb891d50fcbc3b368f (diff)
add smartypants
Diffstat (limited to 'static')
-rwxr-xr-xstatic/js/remark.js6
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
};