DEV: Add slug parameter to hashtag-decorator (#27917)

In order to facilitate discourse-tag-icons and discourse-category-icons to render icons for post content, we need to provide an additional slug parameter here
This commit is contained in:
锦心
2024-07-15 17:22:02 +08:00
committed by GitHub
parent cf5174da69
commit 4d64205eef

View File

@@ -100,6 +100,7 @@ export function decorateHashtags(element, site) {
.generateIconHTML({
icon: site.hashtag_icons[hashtagType],
id: hashtagEl.dataset.id,
slug: hashtagEl.dataset.slug,
})
.trim();
iconPlaceholderEl.replaceWith(domFromString(hashtagIconHTML)[0]);