From 1bd7ad880a0f0bfdabad039825e91d0dd1e89d8c Mon Sep 17 00:00:00 2001 From: Misode Date: Sat, 3 Jan 2026 23:11:48 +0100 Subject: [PATCH] Fix #835 handle invalid identifiers in mcdoc renderer --- .../components/generator/McdocRenderer.tsx | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/app/components/generator/McdocRenderer.tsx b/src/app/components/generator/McdocRenderer.tsx index a74c40f4..06e9b187 100644 --- a/src/app/components/generator/McdocRenderer.tsx +++ b/src/app/components/generator/McdocRenderer.tsx @@ -142,8 +142,6 @@ const SPECIAL_UNSET = '__unset__' function StringHead({ type, optional, excludeStrings, node, ctx }: Props) { const { locale } = useLocale() - const { version } = useVersion() - const use1204 = !checkVersion(version, '1.20.5') const nodeValue = (JsonStringNode.is(node) ? node.value : undefined)?.replaceAll('\n', '\\n') const [value, setValue] = useState(nodeValue) @@ -207,11 +205,7 @@ function StringHead({ type, optional, excludeStrings, node, ctx }: Props - {((idRegistry === 'item' || idRegistry === 'block') && idTags !== 'implicit' && value && !value.startsWith('#')) && } + {((idRegistry === 'item' || idRegistry === 'block') && idTags !== 'implicit' && value && !value.startsWith('#')) && } {isSelect ? <>