feat: wrap content in .markdown-preview-view and .markdown-rendered for Obsidian theme compat

This commit is contained in:
saberzero1 2026-04-25 22:56:55 +02:00
parent 74691eb787
commit 425e7ef7c3
No known key found for this signature in database
5 changed files with 9 additions and 5 deletions

View file

@ -2125,7 +2125,7 @@ var ContentBody_default = (() => {
const frontmatter = fileData?.frontmatter;
const classes = frontmatter?.cssclasses ?? [];
const classString = ["popover-hint", ...classes].join(" ");
return /* @__PURE__ */ jsx("article", { class: classString, children: content });
return /* @__PURE__ */ jsx("article", { class: classString, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: content }) });
};
return ContentBody;
});

File diff suppressed because one or more lines are too long

2
dist/index.js vendored
View file

@ -2125,7 +2125,7 @@ var ContentBody_default = (() => {
const frontmatter = fileData?.frontmatter;
const classes = frontmatter?.cssclasses ?? [];
const classString = ["popover-hint", ...classes].join(" ");
return /* @__PURE__ */ jsx("article", { class: classString, children: content });
return /* @__PURE__ */ jsx("article", { class: classString, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: content }) });
};
return ContentBody;
});

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -20,7 +20,11 @@ export default (() => {
const classes = frontmatter?.cssclasses ?? [];
const classString = ["popover-hint", ...classes].join(" ");
return <article class={classString}>{content}</article>;
return (
<article class={classString}>
<div class="markdown-preview-view markdown-rendered">{content}</div>
</article>
);
};
return ContentBody;