fix: import EXTERNAL_URL_RE from shared

This commit is contained in:
YunYouJun 2025-07-12 20:47:31 +08:00
parent b16a8197dc
commit 426ae8a48f
7 changed files with 7 additions and 5 deletions

View File

@ -2,7 +2,7 @@
// https://router.vuejs.org/guide/advanced/extending-router-link.html#extending-routerlink
import { computed } from 'vue'
import { RouterLink } from 'vue-router'
import { EXTERNAL_URL_RE } from '../../node/constants'
import { EXTERNAL_URL_RE } from '../../shared'
const props = defineProps<{
showExternalIcon?: boolean

View File

@ -2,7 +2,6 @@ import type { UserConfig } from 'vite'
export const EXCERPT_SEPARATOR = '<!-- more -->'
export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i
export const PATHNAME_PROTOCOL_RE = /^pathname:\/\//
export const ALL_ROUTE = '/:all(.*)*'

View File

@ -7,7 +7,8 @@
import type MarkdownIt from 'markdown-it'
import type { MarkdownEnv } from '../env'
import { URL } from 'node:url'
import { EXTERNAL_URL_RE, PATHNAME_PROTOCOL_RE } from '../../../constants'
import { EXTERNAL_URL_RE } from '../../../../shared'
import { PATHNAME_PROTOCOL_RE } from '../../../constants'
const indexRE = /(^|.*\/)index.md(.*)$/i

View File

@ -3,8 +3,8 @@ import type { MarkdownCompileResult } from '../types'
import { slash } from '@antfu/utils'
import fs from 'fs-extra'
import path from 'pathe'
import { EXTERNAL_URL_RE } from '../../../../shared'
import { Valaxy } from '../../../app'
import { EXTERNAL_URL_RE } from '../../../constants'
import { treatAsHtml } from '../utils'
export function createScanDeadLinks(options: ResolvedValaxyOptions) {

View File

@ -1,4 +1,4 @@
import { EXTERNAL_URL_RE } from '../constants'
import { EXTERNAL_URL_RE } from '../../shared'
/**
* is url external (http/https:)

View File

@ -0,0 +1 @@
export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i

View File

@ -1 +1,2 @@
export * from './constants'
export * from './utils'