1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Keep comments when rendering Markdown to allow rendered note metadata (#11530)

This commit is contained in:
Laurent Cozic
2024-12-18 12:02:18 +01:00
committed by GitHub
parent a4be89144e
commit 9b50539591
3 changed files with 6 additions and 0 deletions

View File

@@ -260,6 +260,10 @@ class HtmlUtils {
const parser = new htmlparser2.Parser({
oncomment: (encodedData: string) => {
output.push(`<!--${encodedData}-->`);
},
onopentag: (name: string, attrs: Record<string, string>) => {
// Note: "name" and attribute names are always lowercase even
// when the input is not. So there is no need to call