mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
inline code wrong highlight detection fix (#87)
This commit is contained in:
parent
c1891a3ee3
commit
486a8a262f
10
.eleventy.js
10
.eleventy.js
@ -18,6 +18,7 @@ module.exports = function (eleventyConfig) {
|
|||||||
breaks: true,
|
breaks: true,
|
||||||
html: true,
|
html: true,
|
||||||
})
|
})
|
||||||
|
.use(require("markdown-it-mark"))
|
||||||
.use(require("markdown-it-footnote"))
|
.use(require("markdown-it-footnote"))
|
||||||
.use(function (md) {
|
.use(function (md) {
|
||||||
md.renderer.rules.hashtag_open = function (tokens, idx) {
|
md.renderer.rules.hashtag_open = function (tokens, idx) {
|
||||||
@ -190,15 +191,6 @@ module.exports = function (eleventyConfig) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addFilter("highlight", function (str) {
|
|
||||||
return (
|
|
||||||
str &&
|
|
||||||
str.replace(/\=\=(.*?)\=\=/g, function (match, p1) {
|
|
||||||
return `<mark>${p1}</mark>`;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
eleventyConfig.addFilter("taggify", function (str) {
|
eleventyConfig.addFilter("taggify", function (str) {
|
||||||
return (
|
return (
|
||||||
str &&
|
str &&
|
||||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@ -23,6 +23,7 @@
|
|||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"markdown-it-attrs": "^4.1.6",
|
"markdown-it-attrs": "^4.1.6",
|
||||||
"markdown-it-footnote": "^3.0.3",
|
"markdown-it-footnote": "^3.0.3",
|
||||||
|
"markdown-it-mark": "^3.0.1",
|
||||||
"markdown-it-mathjax3": "^4.3.1",
|
"markdown-it-mathjax3": "^4.3.1",
|
||||||
"markdown-it-plantuml": "^1.4.1",
|
"markdown-it-plantuml": "^1.4.1",
|
||||||
"markdown-it-task-checkbox": "^1.0.6"
|
"markdown-it-task-checkbox": "^1.0.6"
|
||||||
@ -2918,6 +2919,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
||||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
||||||
},
|
},
|
||||||
|
"node_modules/markdown-it-mark": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
|
||||||
|
},
|
||||||
"node_modules/markdown-it-mathjax3": {
|
"node_modules/markdown-it-mathjax3": {
|
||||||
"version": "4.3.2",
|
"version": "4.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it-mathjax3/-/markdown-it-mathjax3-4.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-mathjax3/-/markdown-it-mathjax3-4.3.2.tgz",
|
||||||
@ -7566,6 +7572,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz",
|
||||||
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
"integrity": "sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w=="
|
||||||
},
|
},
|
||||||
|
"markdown-it-mark": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/markdown-it-mark/-/markdown-it-mark-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A=="
|
||||||
|
},
|
||||||
"markdown-it-mathjax3": {
|
"markdown-it-mathjax3": {
|
||||||
"version": "4.3.2",
|
"version": "4.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it-mathjax3/-/markdown-it-mathjax3-4.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-mathjax3/-/markdown-it-mathjax3-4.3.2.tgz",
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"markdown-it-attrs": "^4.1.6",
|
"markdown-it-attrs": "^4.1.6",
|
||||||
"markdown-it-footnote": "^3.0.3",
|
"markdown-it-footnote": "^3.0.3",
|
||||||
|
"markdown-it-mark": "^3.0.1",
|
||||||
"markdown-it-mathjax3": "^4.3.1",
|
"markdown-it-mathjax3": "^4.3.1",
|
||||||
"markdown-it-plantuml": "^1.4.1",
|
"markdown-it-plantuml": "^1.4.1",
|
||||||
"markdown-it-task-checkbox": "^1.0.6"
|
"markdown-it-task-checkbox": "^1.0.6"
|
||||||
|
@ -57,7 +57,7 @@ permalink: "notes/{{ page.fileSlug | slugify }}/"
|
|||||||
{% for imp in dynamics.notes.beforeContent %}
|
{% for imp in dynamics.notes.beforeContent %}
|
||||||
{% include imp %}
|
{% include imp %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ content | hideDataview | link | taggify | highlight | safe}}
|
{{ content | hideDataview | link | taggify | safe}}
|
||||||
{% for imp in dynamics.common.afterContent %}
|
{% for imp in dynamics.common.afterContent %}
|
||||||
{% include imp %}
|
{% include imp %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
{% include imp %}
|
{% include imp %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{%- for garden in collections.gardenEntry -%}
|
{%- for garden in collections.gardenEntry -%}
|
||||||
{{garden.templateContent | hideDataview | link | taggify | highlight | safe }}
|
{{garden.templateContent | hideDataview | link | taggify | safe }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% for imp in dynamics.common.afterContent %}
|
{% for imp in dynamics.common.afterContent %}
|
||||||
{% include imp %}
|
{% include imp %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user