zenn-markdown-html 0.1.159 → 0.1.160-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/embed.js +5 -3
- package/package.json +2 -2
package/lib/embed.js
CHANGED
|
@@ -27,11 +27,13 @@ const embedGenerators = {
|
|
|
27
27
|
}
|
|
28
28
|
return `<span class="embed-block embed-slideshare"><iframe src="https://www.slideshare.net/slideshow/embed_code/key/${(0, _utils.escapeHtml)(key)}" scrolling="no" allowfullscreen loading="lazy"></iframe></span>`;
|
|
29
29
|
},
|
|
30
|
-
speakerdeck(
|
|
31
|
-
if (!(
|
|
30
|
+
speakerdeck(str) {
|
|
31
|
+
if (!(str !== null && str !== void 0 && str.match(/^[a-zA-Z0-9_-]+(?:\?slide=\d+)?$/))) {
|
|
32
32
|
return 'Speaker Deckのkeyが不正です';
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
const [key, slideParamStr] = str.split('?');
|
|
35
|
+
const slideQuery = slideParamStr ? `?${slideParamStr}` : '';
|
|
36
|
+
return `<span class="embed-block embed-speakerdeck"><iframe src="https://speakerdeck.com/player/${(0, _utils.escapeHtml)(key)}${slideQuery}" scrolling="no" allowfullscreen allow="encrypted-media" loading="lazy"></iframe></span>`;
|
|
35
37
|
},
|
|
36
38
|
docswell(str) {
|
|
37
39
|
const errorMessage = 'DocswellのスライドURLが不正です';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zenn-markdown-html",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.160-alpha.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Convert markdown to zenn flavor html.",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"prismjs": "^1.29.0",
|
|
61
61
|
"sanitize-html": "^2.9.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "3dbea2e15c169b8779244b8a6128de95299cb47b",
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
}
|