فهرست منبع

fix(app): keep bare slash as plain inline code (#34122)

Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
opencode-agent[bot] 2 ماه پیش
والد
کامیت
cd56c51e2d
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      packages/session-ui/src/components/markdown-inline-code-kind.ts

+ 1 - 0
packages/session-ui/src/components/markdown-inline-code-kind.ts

@@ -1,6 +1,7 @@
 export function inlineCodeKind(text: string): "path" | "url" | undefined {
   if (/^https?:\/\//i.test(text)) return "url"
   if (/^[a-z][a-z0-9+.-]*:\/\//i.test(text)) return
+  if (text === "/") return
   if (/^\/[a-z][a-z0-9-]*$/i.test(text)) return
   if (/\s/.test(text)) return
   if (/[()\[\]{}*+=<>|&^"';]/.test(text)) return