diff --git a/.eleventy.js b/.eleventy.js
index e112bfb..addca51 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -109,7 +109,7 @@ module.exports = function(eleventyConfig) {
eleventyConfig.setLibrary("md", markdownLib);
- eleventyConfig.addTransform('link', function(str) {
+ eleventyConfig.addFilter('link', function(str) {
return str && str.replace(/\[\[(.*?\|.*?)\]\]/g, function(match, p1) {
//Check if it is an embedded excalidraw drawing or mathjax javascript
if (p1.indexOf("],[") > -1 || p1.indexOf('"$"') > -1) {
@@ -143,7 +143,7 @@ module.exports = function(eleventyConfig) {
});
})
- eleventyConfig.addTransform('highlight', function(str) {
+ eleventyConfig.addFilter('highlight', function(str) {
return str && str.replace(/\=\=(.*?)\=\=/g, function(match, p1) {
return `${p1}`;
});
@@ -155,7 +155,7 @@ module.exports = function(eleventyConfig) {
let titleDiv = "";
let calloutType = "";
const calloutMeta = /\[!(\w*)\](\s?.*)/g;
- if(!content.match(calloutMeta)){
+ if (!content.match(calloutMeta)) {
return match;
}
diff --git a/src/site/_includes/layouts/note.njk b/src/site/_includes/layouts/note.njk
index 078b70e..f900ede 100644
--- a/src/site/_includes/layouts/note.njk
+++ b/src/site/_includes/layouts/note.njk
@@ -15,7 +15,7 @@ permalink: "notes/{{ page.fileSlug | slugify }}/"
{% if dgHomeLink !== false%}
🏡 Back Home
{% endif %}
- {{ content | safe}}
+ {{ content | link | highlight | safe}}