(bug) <LinkedText/> should open files in new tab (nuxt router messes it up)

This commit is contained in:
Andrea Vos 2024-01-17 18:03:35 +01:00
parent 3488ec3b9f
commit 07e4d9781c

View File

@ -42,9 +42,10 @@ export default {
linkBuffer = `#${buffer}`;
}
if (linkBuffer.indexOf('https://') === 0 ||
linkBuffer.indexOf('http://') === 0 ||
linkBuffer.indexOf('mailto:') === 0
if (linkBuffer.startsWith('https://') ||
linkBuffer.startsWith('http://') ||
linkBuffer.startsWith('mailto:') ||
linkBuffer.endsWith('.pdf')
) {
return h(
'a',