summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2025-12-16 12:12:01 +0000
committerDavid Hill <[email protected]>2025-12-16 12:12:01 +0000
commitf0ed1e38c96d39f53be57f1710f21e1fef9fdfa9 (patch)
treef94d88f8294b3b5e11ed61d53e0d8e0c6f908b58 /packages/ui/src/components
parentac0f1dbbdddde76e8b40c6e4895302f870648bf2 (diff)
downloadopencode-f0ed1e38c96d39f53be57f1710f21e1fef9fdfa9.tar.gz
opencode-f0ed1e38c96d39f53be57f1710f21e1fef9fdfa9.zip
Revert "fix: strip parentheses from file paths generated by llm"
This reverts commit 6c1a1a77b762dbde875f0325ca43903c2c0840b6.
Diffstat (limited to 'packages/ui/src/components')
-rw-r--r--packages/ui/src/components/markdown.tsx8
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/ui/src/components/markdown.tsx b/packages/ui/src/components/markdown.tsx
index 7524f8921..071132e80 100644
--- a/packages/ui/src/components/markdown.tsx
+++ b/packages/ui/src/components/markdown.tsx
@@ -7,12 +7,6 @@ function strip(text: string): string {
return match ? match[2] : text
}
-function removeParensAroundFileRefs(text: string): string {
- // Remove parentheses around inline code that looks like a file reference
- // Matches: (`path/to/file.ext`) or (`path/to/file.ext:1-10`) or (`file.ext:42`)
- return text.replace(/\(\s*(`[^`]+\.[a-zA-Z0-9]+(?::\d+(?:-\d+)?)?`)\s*\)/g, "$1")
-}
-
export function Markdown(
props: ComponentProps<"div"> & {
text: string
@@ -23,7 +17,7 @@ export function Markdown(
const [local, others] = splitProps(props, ["text", "class", "classList"])
const marked = useMarked()
const [html] = createResource(
- () => removeParensAroundFileRefs(strip(local.text)),
+ () => strip(local.text),
async (markdown) => {
return marked.parse(markdown)
},