chore: minor tweaks

pull/2429/head
Divyansh Singh 2 years ago
parent e7be720ede
commit 0e962178ac

@ -158,6 +158,10 @@ debouncedWatch(
const mapId = id.slice(0, id.indexOf('#'))
let map = c.get(mapId)
if (map) continue
else {
map = new Map()
c.set(mapId, map)
}
const comp = mod.default ?? mod
if (comp?.render) {
const app = createApp(comp)
@ -181,10 +185,6 @@ debouncedWatch(
const sections = div.innerHTML.split(headingRegex)
app.unmount()
sections.shift()
if (!map) {
map = new Map()
c.set(mapId, map)
}
for (let i = 0; i < sections.length; i += 3) {
const anchor = sections[i + 1]
const html = sections[i + 2]

Loading…
Cancel
Save