mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
fix: only convert app links to <NuxtLink>
This commit is contained in:
parent
2d0f988ed1
commit
ecbf8a9ddb
@ -77,7 +77,7 @@ export const RenderPlugin = () => {
|
|||||||
.match(/<body.*?>([\s\S]*)<\/body>/)?.[0]
|
.match(/<body.*?>([\s\S]*)<\/body>/)?.[0]
|
||||||
.replace(/(?<=<|<\/)body/g, 'div')
|
.replace(/(?<=<|<\/)body/g, 'div')
|
||||||
.replace(/messages\./g, '')
|
.replace(/messages\./g, '')
|
||||||
.replace(/<a href="([^"]+)"([^>]*)>([\s\S]*)<\/a>/g, '<NuxtLink to="$1"$2>$3</NuxtLink>')
|
.replace(/<a href="(\/[^"]*)"([^>]*)>([\s\S]*)<\/a>/g, '<NuxtLink to="$1"$2>$3</NuxtLink>')
|
||||||
.replace(/>{{\s*([\s\S]+?)\s*}}<\/[\w-]*>/g, ' v-html="$1" />')
|
.replace(/>{{\s*([\s\S]+?)\s*}}<\/[\w-]*>/g, ' v-html="$1" />')
|
||||||
// We are not matching <link> <script> and <meta> tags as these aren't used yet in nuxt/ui
|
// We are not matching <link> <script> and <meta> tags as these aren't used yet in nuxt/ui
|
||||||
// and should be taken care of wherever this SFC is used
|
// and should be taken care of wherever this SFC is used
|
||||||
|
Loading…
Reference in New Issue
Block a user