From 32b6cf4af76e204036afa3388eea7dfe86eebcb3 Mon Sep 17 00:00:00 2001 From: Peaceultime Date: Tue, 23 Dec 2025 12:23:06 +0100 Subject: [PATCH] Fix incorrect tag end position --- shared/grammar/tag.extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/grammar/tag.extension.ts b/shared/grammar/tag.extension.ts index e9d59e0..d8763eb 100644 --- a/shared/grammar/tag.extension.ts +++ b/shared/grammar/tag.extension.ts @@ -15,7 +15,7 @@ export const tag: MarkdownConfig = { if (cx.slice(pos, pos + 1).charCodeAt(0) !== 35 || String.fromCharCode(next).trim() === '') return -1; const end = cx.slice(pos, cx.end).search(/\s/); - return cx.addElement(cx.elt('Tag', pos, end === -1 ? cx.end : end, [ cx.elt('TagMeta', pos, pos + 1) ])); + return cx.addElement(cx.elt('Tag', pos, end === -1 ? cx.end : pos + end, [ cx.elt('TagMeta', pos, pos + 1) ])); }, }], props: [