mirror of https://github.com/YunYouJun/valaxy
fix: import EXTERNAL_URL_RE from shared
This commit is contained in:
parent
b16a8197dc
commit
426ae8a48f
|
@ -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
|
||||
|
|
|
@ -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(.*)*'
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { EXTERNAL_URL_RE } from '../constants'
|
||||
import { EXTERNAL_URL_RE } from '../../shared'
|
||||
|
||||
/**
|
||||
* is url external (http/https:)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\/\/)/i
|
|
@ -1 +1,2 @@
|
|||
export * from './constants'
|
||||
export * from './utils'
|
||||
|
|
Loading…
Reference in New Issue