perf(dom): reduce unnecessary conversions

This commit is contained in:
dragonish 2025-04-18 13:33:03 +08:00
parent f417094d63
commit ef26e6eec9
No known key found for this signature in database
GPG key ID: 6F42FA9E807A5177

View file

@ -176,10 +176,10 @@ export function decorateOutlineElement(
/**
* Compare heading text.
*
* @param l The left heading text.
* @param r The right heading text.
* @param source The source heading text.
* @param outline The outline heading text.
* @returns true if the two headings are equal, false otherwise.
*/
export function compareHeadingText(l: string, r: string): boolean {
return compareMarkdownText(htmlToMarkdown(l), htmlToMarkdown(r));
export function compareHeadingText(source: string, outline: string): boolean {
return compareMarkdownText(htmlToMarkdown(source), outline);
}