mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-31 14:22:27 +00:00
13 lines
357 B
TypeScript
13 lines
357 B
TypeScript
export namespace ConfigMarkdown {
|
|
export const FILE_REGEX = /(?<![\w`])@(\.?[^\s`,.]*(?:\.[^\s`,.]+)*)/g
|
|
export const SHELL_REGEX = /!`([^`]+)`/g
|
|
|
|
export function files(template: string) {
|
|
return Array.from(template.matchAll(FILE_REGEX))
|
|
}
|
|
|
|
export function shell(template: string) {
|
|
return Array.from(template.matchAll(SHELL_REGEX))
|
|
}
|
|
}
|