Skip to content

Commit cd56c51

Browse files
opencode-agent[bot]๐“›๐“ฒ๐“ฝ๐“ฝ๐“ต๐“ฎ ๐“•๐“ป๐“ช๐“ท๐“ด
andauthored
fix(app): keep bare slash as plain inline code (anomalyco#34122)
Co-authored-by: ๐“›๐“ฒ๐“ฝ๐“ฝ๐“ต๐“ฎ ๐“•๐“ป๐“ช๐“ท๐“ด <little-frank@opencord.local>
1 parent 43e39d7 commit cd56c51

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

โ€Žpackages/session-ui/src/components/markdown-inline-code-kind.tsโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export function inlineCodeKind(text: string): "path" | "url" | undefined {
22
if (/^https?:\/\//i.test(text)) return "url"
33
if (/^[a-z][a-z0-9+.-]*:\/\//i.test(text)) return
4+
if (text === "/") return
45
if (/^\/[a-z][a-z0-9-]*$/i.test(text)) return
56
if (/\s/.test(text)) return
67
if (/[()\[\]{}*+=<>|&^"';]/.test(text)) return

0 commit comments

Comments
ย (0)