Merge branch 'johnfactotum:main' into main

This commit is contained in:
2026-05-24 19:55:25 -04:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -357,8 +357,8 @@ export class View extends HTMLElement {
const href_ = a.getAttribute('href')
const href = section?.resolveHref?.(href_) ?? href_
if (book?.isExternal?.(href))
Promise.resolve(this.#emit('external-link', { a, href }, true))
.then(x => x ? globalThis.open(href, '_blank') : null)
Promise.resolve(this.#emit('external-link', { a, href_ }, true))
.then(x => x ? globalThis.open(href_, '_blank') : null)
.catch(e => console.error(e))
else Promise.resolve(this.#emit('link', { a, href }, true))
.then(x => x ? this.goTo(href) : null)