hematite 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_layouts/remark_slideshow.html +29 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d695f60bf686920b70204b57a6938283468f63be8ba35467bff6db792fbed6af
|
4
|
+
data.tar.gz: d5b505891fb8bb9be670d61454b8c80e5c0ac7463d22fbeba4244ceea9692a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f67a7e799a1a0bf26222a9fb9891e8265bf70d1f2e5210cdc85d0e293499c6da68ed589c401ab754ff30588d81eb8a3923a104b2343569539f01d95f0f80d39
|
7
|
+
data.tar.gz: e8c5c1dcde0d2f9087a251658e5a7e5eb15dd97f2a8ac31bdeb2147fad6fac8f609d42a96d85bb36964c6f43511baa0cc5202cdd3335a11dadb8fb2729d5e398
|
@@ -3,9 +3,13 @@ layout: default
|
|
3
3
|
---
|
4
4
|
|
5
5
|
<!-- Defines a https://remarkjs.com/ slideshow -->
|
6
|
-
<!--
|
6
|
+
<!--
|
7
|
+
Configure remark with
|
7
8
|
page.remark_presentation_config, site.remark_presentation_config,
|
8
9
|
page.remark_presentation_config_html
|
10
|
+
|
11
|
+
Note: Jekyll's default parser must not parse the input markdown file.
|
12
|
+
Either use a non-md extension or wrap its content in a <div markdown=false>...</div>
|
9
13
|
-->
|
10
14
|
|
11
15
|
{% assign frame_resource_url = 'assets/html/remark_presentation_frame.html.resource' | relative_url %}
|
@@ -16,7 +20,20 @@ layout: default
|
|
16
20
|
onload="window.presentationFrameLoaded = true;"></iframe>
|
17
21
|
</main>
|
18
22
|
|
23
|
+
<!--
|
24
|
+
Liquid (sometimes?) does not handle unicode (e.g. π) characters properly when using
|
25
|
+
url_encode (or at least not consistently with JS's unescape), so include
|
26
|
+
content directly:
|
27
|
+
-->
|
28
|
+
<textarea id="source" style="display: none;">
|
29
|
+
{{content}}
|
30
|
+
</textarea>
|
31
|
+
|
19
32
|
<script defer type="module">
|
33
|
+
// Matches <div>...</div> or <div markdown=0>...</div>
|
34
|
+
// Jekyll can remove the 'markdown=0' while parsing.
|
35
|
+
const WRAPPING_DIV_EXP = /\s*[<]div.*[>]((?:.|[\n\r])*)[<]\/div[>]\s*/;
|
36
|
+
|
20
37
|
import slideshow from "{{ 'assets/js/layout/remark_slideshow.mjs' | relative_url }}";
|
21
38
|
|
22
39
|
let presentationFrame = document.querySelector("#presentation_frame");
|
@@ -27,7 +44,17 @@ layout: default
|
|
27
44
|
{{ page.remark_presentation_config | default: site.remark_presentation_config | jsonify }};
|
28
45
|
config ??= {};
|
29
46
|
|
30
|
-
|
47
|
+
// Escape the content to prevent liquid from rendering it.
|
48
|
+
config.source = document.querySelector("#source").value;
|
49
|
+
|
50
|
+
// Unwrap if surrounded by markdown-parser-disabling HTML
|
51
|
+
let markdownDisableMatches = config.source.match(WRAPPING_DIV_EXP);
|
52
|
+
console.log(markdownDisableMatches, config.source);
|
53
|
+
|
54
|
+
// Replace with first capture (contents of the wrapping element).
|
55
|
+
if (markdownDisableMatches && markdownDisableMatches.length > 0) {
|
56
|
+
config.source = markdownDisableMatches[1];
|
57
|
+
}
|
31
58
|
|
32
59
|
// Library imports intended for this page: Forward to the frame.
|
33
60
|
let libraryImports = unescape(`
|