mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
Fix router (#39)
* on click, do not add route if included in pathname * corrected readme tools table links * remove code blocks inside links * corrected hypercore and hyperwarm links --------- Co-authored-by: rafapaezbas <rafa@holepunch.com>
This commit is contained in:
@@ -71,7 +71,7 @@ customElements.define('docs-viewer', class extends HTMLElement {
|
||||
async load (page = '/') {
|
||||
if (page === '/') page = this.entry
|
||||
const html = await fetch(page)
|
||||
const text = await marked.parse(await html.text())
|
||||
const text = await marked.parse((await html.text()).replace(/\[`([^`]+)`\]/g, "[$1]")) // remove backticks inside link, example: [`hypercore`] -> [hypercore]
|
||||
this.panel.querySelector('slot').innerHTML = text
|
||||
this.panel.style.display = ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user