From aa4f5294a3b0a8fa7e10d128c8f0258ad024ae73 Mon Sep 17 00:00:00 2001 From: Hydrophobefireman Date: Sun, 31 Mar 2024 12:44:20 -0400 Subject: [PATCH 1/2] fix: do not render

inside FolderContent article (#1044) it can lead to nested

's which is actually [invalid html](https://www.w3.org/TR/html401/struct/text.html#h-9.3.1:~:text=The%20P%20element%20represents%20a%20paragraph.%20It%20cannot%20contain%20block%2Dlevel%20elements%20(including%20P%20itself).) --- quartz/components/pages/FolderContent.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quartz/components/pages/FolderContent.tsx b/quartz/components/pages/FolderContent.tsx index 55f1e427d..a13f135f8 100644 --- a/quartz/components/pages/FolderContent.tsx +++ b/quartz/components/pages/FolderContent.tsx @@ -47,9 +47,7 @@ export default ((opts?: Partial) => { return (

-
-

{content}

-
+
{content}
{options.showFolderCount && (

From 5ec61468d5e787b3c8ae32a2b4ef1595cf0bc3ee Mon Sep 17 00:00:00 2001 From: Emile Bangma Date: Sun, 31 Mar 2024 18:44:50 +0200 Subject: [PATCH 2/2] fix(wikilinks): proper escaping of pipe character in wikilinks inside tables (#1040) --- quartz/plugins/transformers/ofm.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 3ee6480ca..108f7f779 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -188,7 +188,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin const [raw]: (string | undefined)[] = capture let escaped = raw ?? "" escaped = escaped.replace("#", "\\#") - escaped = escaped.replace("|", "\\|") + // escape pipe characters if they are not already escaped + escaped = escaped.replace(/((^|[^\\])(\\\\)*)\|/g, "$1\\|") return escaped })