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

This commit is contained in:
saberzero1 2026-04-25 22:57:04 +02:00
parent f104a56e83
commit f7fe4068d0
No known key found for this signature in database
5 changed files with 12 additions and 8 deletions

View file

@ -2793,7 +2793,7 @@ var TagContent_default = ((opts) => {
tagItemMap.set(t, allPagesWithTag(t));
}
return /* @__PURE__ */ jsxs("div", { class: "popover-hint", children: [
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("p", { children: content }) }),
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: /* @__PURE__ */ jsx("p", { children: content }) }) }),
/* @__PURE__ */ jsx("p", { children: i18n(locale).pages.tagContent.totalTags({ count: tags.length }) }),
/* @__PURE__ */ jsx("div", { children: tags.map((t) => {
const pages = tagItemMap.get(t);
@ -2842,7 +2842,7 @@ var TagContent_default = ((opts) => {
sort: options?.sort
});
return /* @__PURE__ */ jsxs("div", { class: "popover-hint", children: [
/* @__PURE__ */ jsx("article", { class: classes, children: content }),
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: content }) }),
/* @__PURE__ */ jsxs("div", { class: "page-listing", children: [
/* @__PURE__ */ jsx("p", { children: i18n(locale).pages.tagContent.itemsUnderTag({ count: pages.length }) }),
/* @__PURE__ */ jsx("div", { children: pageListContent })

File diff suppressed because one or more lines are too long

4
dist/index.js vendored
View file

@ -2777,7 +2777,7 @@ var TagContent_default = ((opts) => {
tagItemMap.set(t, allPagesWithTag(t));
}
return /* @__PURE__ */ jsxs("div", { class: "popover-hint", children: [
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("p", { children: content }) }),
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: /* @__PURE__ */ jsx("p", { children: content }) }) }),
/* @__PURE__ */ jsx("p", { children: i18n(locale).pages.tagContent.totalTags({ count: tags.length }) }),
/* @__PURE__ */ jsx("div", { children: tags.map((t) => {
const pages = tagItemMap.get(t);
@ -2826,7 +2826,7 @@ var TagContent_default = ((opts) => {
sort: options?.sort
});
return /* @__PURE__ */ jsxs("div", { class: "popover-hint", children: [
/* @__PURE__ */ jsx("article", { class: classes, children: content }),
/* @__PURE__ */ jsx("article", { class: classes, children: /* @__PURE__ */ jsx("div", { class: "markdown-preview-view markdown-rendered", children: content }) }),
/* @__PURE__ */ jsxs("div", { class: "page-listing", children: [
/* @__PURE__ */ jsx("p", { children: i18n(locale).pages.tagContent.itemsUnderTag({ count: pages.length }) }),
/* @__PURE__ */ jsx("div", { children: pageListContent })

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -81,7 +81,9 @@ export default ((opts?: Partial<TagContentOptions>) => {
return (
<div class="popover-hint">
<article class={classes}>
<p>{content}</p>
<div class="markdown-preview-view markdown-rendered">
<p>{content}</p>
</div>
</article>
<p>{i18n(locale).pages.tagContent.totalTags({ count: tags.length })}</p>
<div>
@ -153,7 +155,9 @@ export default ((opts?: Partial<TagContentOptions>) => {
return (
<div class="popover-hint">
<article class={classes}>{content}</article>
<article class={classes}>
<div class="markdown-preview-view markdown-rendered">{content}</div>
</article>
<div class="page-listing">
<p>{i18n(locale).pages.tagContent.itemsUnderTag({ count: pages.length })}</p>
<div>{pageListContent}</div>