From b032d88a17ebb9402c9ea88a46ee6ff5cfd08114 Mon Sep 17 00:00:00 2001 From: Stephen Tse Date: Sat, 19 Apr 2025 15:10:12 -0700 Subject: [PATCH] Fixed a couple more highlight syntax regex issues --- 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 77d1d33d7..31b9f60df 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -126,7 +126,8 @@ export const tableRegex = new RegExp(/^\|([^\n])+\|\n(\|)( ?:?-{3,}:? ?\|)+\n(\| // matches any wikilink, only used for escaping wikilinks inside tables export const tableWikilinkRegex = new RegExp(/(!?\[\[[^\]]*?\]\]|\[\^[^\]]*?\])/g) -const highlightRegex = new RegExp(/==([^=]+?)==/g) +// Exclude arrow syntax from highlight syntax matching, namely `==>` and `<==` +const highlightRegex = new RegExp(/(?)(.+?)(?)/g) const commentRegex = new RegExp(/%%[\s\S]*?%%/g) // from https://github.com/escwxyz/remark-obsidian-callout/blob/main/src/index.ts const calloutRegex = new RegExp(/^\[\!([\w-]+)\|?(.+?)?\]([+-]?)/)