/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/ui/src/context/marked-code-span.ts
17 строк
474 B
Luke Parker
fix(ui): preserve code spans adjacent to tildes (#35835)
14 июл 2026, 03:02
Не верифицирован
14 июл 2026, 03:02
9a51765
Код
Авторство
О чём код?
import type { MarkedExtension } from "marked" // Keep adjacent tilde and backtick runs separate until markedjs/marked#4011 is released. export const markedCodeSpanBoundary = { tokenizer: { inlineText(src) { const match = /^(`+(?=~)|~+(?=`))/.exec(src) if (!match) return false return { type: "text", raw: match[0], text: match[0], escaped: this.lexer.state.inRawBlock, } }, }, } satisfies MarkedExtension