ma
marcoroth
GitHub
herb
Workspace
GitHub
CI Pipeline Executions
Current execution
Succeeded
main
Runs and Agents
Timeline
Beta
Configuration
Self-Healing CI
Project Graph
Circular Dependencies
Enterprise
Resource Usage
Analysis
Conformance
Enterprise
Runs
Current run
Succeeded
Tasks
Resource Usage
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Highlighter: Add a `linkResolver` option to `ANSIConverter` (#2325) `ANSIConverter` copies the OSC 8 target straight into the `href`, which is what you want in a terminal but leaves a `file://` link inert on a page served over http. A browser had no way to influence the target, since the only option was `links: true | false` and `<herb-ansi>` builds its converter internally. This pull request adds a `linkResolver` that rewrites the target before it becomes an anchor. ```ts new ANSIConverter({ linkResolver: url => url.replace("file:///workspace/", "https://github.com/marcoroth/herb/blob/main/"), }) ``` The resolver runs before the scheme allowlist, which is the ordering that makes it useful. A dead `file://` target can become a live `https://` one, and a resolver that returns something unsafe still produces no anchor. Returning `null` drops the link and keeps the styled text, and the resolver is never consulted when `links` is off.
nx build @herb-tools/tailwind-class-sorter
⌘K
Succeeded
nx build @herb-tools/tailwind-class-sorter
Click to copy
Linux
4 CPU cores
3e910783
main
GitHub
herb
Workspace