Просмотр исходного кода

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

Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
opencode-agent[bot] 2 месяцев назад
Родитель
Сommit
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