fix: raw shortcode content rendering in another shortcode

This commit is contained in:
Dillon
2022-05-07 01:20:39 +08:00
parent eb924ead82
commit 28bc034af0
5 changed files with 164 additions and 96 deletions

View File

@@ -43,6 +43,12 @@ class Theme {
if (window.objectFitImages) objectFitImages();
}
initRaw() {
this.util.forEach(document.querySelectorAll('[data-raw]'), $raw => {
$raw.innerHTML = this.data[$raw.id];
});
}
initSVGIcon() {
this.util.forEach(document.querySelectorAll('[data-svg-src]'), $icon => {
fetch($icon.getAttribute('data-svg-src'))
@@ -703,6 +709,7 @@ class Theme {
init() {
try {
this.initRaw();
this.initSVGIcon();
this.initTwemoji();
this.initMenuMobile();