Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6e67fb5f
authored
Sep 11, 2024
by
Li Kui
Committed by
GitHub
Sep 11, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(@vben/docs): build failed on windows (#4362)
1 parent
3697f6bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
docs/.vitepress/config/plugins/demo-preview.ts
docs/.vitepress/config/plugins/demo-preview.ts
View file @
6e67fb5
...
@@ -47,7 +47,10 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => {
...
@@ -47,7 +47,10 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => {
const
regex
=
/<DemoPreview
[^
>
]
*
\s
dir="
([^
"
]
*
)
"/g
;
const
regex
=
/<DemoPreview
[^
>
]
*
\s
dir="
([^
"
]
*
)
"/g
;
// Iterate through the Markdown content and replace the pattern
// Iterate through the Markdown content and replace the pattern
state
.
src
=
state
.
src
.
replaceAll
(
regex
,
(
_match
,
dir
)
=>
{
state
.
src
=
state
.
src
.
replaceAll
(
regex
,
(
_match
,
dir
)
=>
{
const
componentDir
=
join
(
process
.
cwd
(),
'src'
,
dir
);
const
componentDir
=
join
(
process
.
cwd
(),
'src'
,
dir
).
replaceAll
(
'\\'
,
'/'
,
);
let
childFiles
:
string
[]
=
[];
let
childFiles
:
string
[]
=
[];
let
dirExists
=
true
;
let
dirExists
=
true
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment