diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-03-26 08:42:14 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-03-26 08:42:14 -0300 |
commit | 4e6f3c16818d9beb200c337d48c8ae2470a322ee (patch) | |
tree | b05bc1f5df177572bdf61eb32d0c34823d010ce1 /src/content | |
parent | 5dfdb661c4672bcf432c9bd283a2ffec5a3c1cb3 (diff) |
data steps: linkTemplate snapshot tests
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/linkTemplate.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/content/dependencies/linkTemplate.js b/src/content/dependencies/linkTemplate.js index 94b90652..acac99be 100644 --- a/src/content/dependencies/linkTemplate.js +++ b/src/content/dependencies/linkTemplate.js @@ -26,7 +26,10 @@ export default { } if (appendIndexHTML) { - if (/^(?!https?:\/\/).+\/$/.test(href)) { + if ( + /^(?!https?:\/\/).+\/$/.test(href) && + href.endsWith('/') + ) { href += 'index.html'; } } |