mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-22 00:01:34 +00:00
5cdecd795c
* support more than 3 path segments * Fix explore db resource not working with 4+ path segments * don't assume 3 segments * ?table= syntax impl * update parsers * more nit fixes * fix sql query * claude nit * Update SQLx metadata --------- Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
13 lines
412 B
TypeScript
13 lines
412 B
TypeScript
const pathRegex = /\b(u|f)(\/[^\/\s]+){2,}\b/g
|
|
|
|
export function processMessage(message: string | undefined): string {
|
|
let msg = !message
|
|
? 'Error without message'
|
|
: typeof message != 'string'
|
|
? JSON.stringify(message, null, 2)
|
|
: message
|
|
return msg.replaceAll(pathRegex, (path) => {
|
|
return `<span class="bg-surface-secondary p-1 text-xs font-mono whitespace-nowrap rounded-md">${path}</span>`
|
|
})
|
|
}
|