From b4fd4f344ca1dcddd5164c6fbea0b4ddba776a35 Mon Sep 17 00:00:00 2001 From: Xananax Date: Tue, 28 Jun 2022 11:09:06 +0200 Subject: [PATCH] fix: properly parse titles --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 012fca2..d20fd89 100644 --- a/index.html +++ b/index.html @@ -237,7 +237,7 @@ .then((response) => response.text()) .then(wait) .then((text) => { - const [, title] = text.match(/^(#\s\w+)/) || + const [, title] = text.match(/^#\s+(\w+.+)/) || text.match(/(.*?)\n===+/m) || [, path]; document.title = `${title} | ${mainTitle}`; if (params.has("source")) {