diff --git a/.eleventy.js b/.eleventy.js index 440c255..fc872bb 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -18,6 +18,7 @@ module.exports = function (eleventyConfig) { breaks: true, html: true, }) + .use(require("markdown-it-mark")) .use(require("markdown-it-footnote")) .use(function (md) { 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 `${p1}`; - }) - ); - }); - eleventyConfig.addFilter("taggify", function (str) { return ( str && diff --git a/package-lock.json b/package-lock.json index fcee062..9e551dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "markdown-it": "^13.0.1", "markdown-it-attrs": "^4.1.6", "markdown-it-footnote": "^3.0.3", + "markdown-it-mark": "^3.0.1", "markdown-it-mathjax3": "^4.3.1", "markdown-it-plantuml": "^1.4.1", "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", "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": { "version": "4.3.2", "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", "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": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/markdown-it-mathjax3/-/markdown-it-mathjax3-4.3.2.tgz", diff --git a/package.json b/package.json index 5a9c89f..f54409d 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "markdown-it": "^13.0.1", "markdown-it-attrs": "^4.1.6", "markdown-it-footnote": "^3.0.3", + "markdown-it-mark": "^3.0.1", "markdown-it-mathjax3": "^4.3.1", "markdown-it-plantuml": "^1.4.1", "markdown-it-task-checkbox": "^1.0.6" diff --git a/src/site/_includes/layouts/note.njk b/src/site/_includes/layouts/note.njk index 7e06a59..a69c075 100644 --- a/src/site/_includes/layouts/note.njk +++ b/src/site/_includes/layouts/note.njk @@ -57,7 +57,7 @@ permalink: "notes/{{ page.fileSlug | slugify }}/" {% for imp in dynamics.notes.beforeContent %} {% include imp %} {% endfor %} - {{ content | hideDataview | link | taggify | highlight | safe}} + {{ content | hideDataview | link | taggify | safe}} {% for imp in dynamics.common.afterContent %} {% include imp %} {% endfor %} diff --git a/src/site/index.njk b/src/site/index.njk index 4ea54e3..b8442be 100644 --- a/src/site/index.njk +++ b/src/site/index.njk @@ -53,7 +53,7 @@ {% include imp %} {% endfor %} {%- for garden in collections.gardenEntry -%} - {{garden.templateContent | hideDataview | link | taggify | highlight | safe }} + {{garden.templateContent | hideDataview | link | taggify | safe }} {%- endfor -%} {% for imp in dynamics.common.afterContent %} {% include imp %}