Fix markup heading parsing, fix emphasis parsing (#36284)

Fixes #36106, fix #17958

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Heath Dutton🕴️
2026-01-23 15:24:58 -05:00
committed by GitHub
parent cfd7218395
commit 0f78b99998
15 changed files with 260 additions and 196 deletions

View File

@@ -1,5 +1,6 @@
import {svg} from '../svg.ts';
// FIXME: don't see why these tricks make sense. If these prefixes are not needed, they should be removed entirely by backend.
const addPrefix = (str: string): string => `user-content-${str}`;
const removePrefix = (str: string): string => str.replace(/^user-content-/, '');
const hasPrefix = (str: string): boolean => str.startsWith('user-content-');