fix: properly parse titles
This commit is contained in:
parent
b03ddcb428
commit
b4fd4f344c
@ -237,7 +237,7 @@
|
|||||||
.then((response) => response.text())
|
.then((response) => response.text())
|
||||||
.then(wait)
|
.then(wait)
|
||||||
.then((text) => {
|
.then((text) => {
|
||||||
const [, title] = text.match(/^(#\s\w+)/) ||
|
const [, title] = text.match(/^#\s+(\w+.+)/) ||
|
||||||
text.match(/(.*?)\n===+/m) || [, path];
|
text.match(/(.*?)\n===+/m) || [, path];
|
||||||
document.title = `${title} | ${mainTitle}`;
|
document.title = `${title} | ${mainTitle}`;
|
||||||
if (params.has("source")) {
|
if (params.has("source")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user