mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-22 03:06:54 +00:00
path recognition in ui fix
This commit is contained in:
parent
7a3de51bfb
commit
04fdc67746
1 changed files with 3 additions and 3 deletions
|
|
@ -629,9 +629,9 @@ function convertPathsToLinks(str) {
|
|||
return html;
|
||||
}
|
||||
|
||||
const prefix = `(?:[ \`'"\\n]|'|")`; // Use a non-capturing group for OR logic
|
||||
const folder = `[a-zA-Z0-9_\\/\\.]`; // Characters allowed in folder names
|
||||
const file = `[a-zA-Z0-9_\\/]`; // Characters allowed in file names
|
||||
const prefix = `(?:^|[ \`'"\\n]|'|")`; // Use a non-capturing group for OR logic
|
||||
const folder = `[a-zA-Z0-9_\\/.\\-]`; // Characters allowed in folder chain
|
||||
const file = `[a-zA-Z0-9_\\-\\/]`; // Characters allowed in file names
|
||||
const suffix = `(?<!\\.)`
|
||||
|
||||
const regex = new RegExp(`(?<=${prefix})\\/${folder}*${file}${suffix}`, 'g');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue