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
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
parent8aa927e840f590908543c3cb891d50fcbc3b368f (diff)
add smartypants
-rw-r--r--exampleSite/content/slides/adirondack/index.md8
-rw-r--r--layouts/slides/single.html2
-rwxr-xr-xstatic/js/remark.js6
3 files changed, 11 insertions, 5 deletions
diff --git a/exampleSite/content/slides/adirondack/index.md b/exampleSite/content/slides/adirondack/index.md
index 750697e..379b1a2 100644
--- a/exampleSite/content/slides/adirondack/index.md
+++ b/exampleSite/content/slides/adirondack/index.md
@@ -169,7 +169,7 @@ Mist enveloped the ship three hours out from port.
- My two natures had memory in common.
- The face of the moon was in shadow.
-Call me Ishmael. Some years ago—never mind how long precisely—having little or
+Call me Ishmael. Some years ago---never mind how long precisely---having little or
no money in my purse, and nothing particular to interest me on shore, I thought
I would sail about a little and see the watery part of the world.
@@ -229,7 +229,7 @@ A shining crescent far beneath the flying vessel.
- Silver mist suffused the deck of the ship.
- The face of the moon was in shadow.
-Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.
+Call me Ishmael. Some years ago---never mind how long precisely---having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world.
---
class: roomy
@@ -359,6 +359,10 @@ fits on a single line.
This doesn't work on title slides.
+Story also applies 6'2" tall "smartypants" processing to replace 'straight
+quotes,' en- and em-dashes (boil for 12--15 minutes---longer if needed),
+and ellipses with their nicer typographical equivalents... isn't that nice?
+
---
layout: true
diff --git a/layouts/slides/single.html b/layouts/slides/single.html
index b9b3b4b..3328e24 100644
--- a/layouts/slides/single.html
+++ b/layouts/slides/single.html
@@ -43,7 +43,7 @@
{{- .RawContent -}}
</textarea>
<script type="text/javascript" src="{{ "/js/qrcode.js" | absURL }}"></script>
- <script src="{{ "/js/remark.min.js" | absURL }}"></script>
+ <script src="{{ "/js/remark.js" | absURL }}"></script>
<script>
var slideshow = remark.create({
{{ if .Params.ratio }} ratio: "{{ .Params.ratio }}", {{ end }}
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
};