Files
opencode/packages/ui/src/context/marked-code-span.ts
+20 634386fe0f chore: merge dev into v2 (#36770)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: usrnk1 <[email protected]>
Co-authored-by: Aarav Sareen <[email protected]>
Co-authored-by: Luke Parker <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: Kit Langton <[email protected]>
Co-authored-by: James Long <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Jay <[email protected]>
Co-authored-by: Simon Klee <[email protected]>
Co-authored-by: Jay <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: David Hill <[email protected]>
Co-authored-by: Brendan Allan <[email protected]>
Co-authored-by: opencode <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: James Long <[email protected]>
Co-authored-by: Dustin Deus <[email protected]>
Co-authored-by: 冯基魁 <[email protected]>
Co-authored-by: Frank <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Co-authored-by: Victor Navarro <[email protected]>
Co-authored-by: Dax Raad <[email protected]>
Co-authored-by: Dax <[email protected]>
Co-authored-by: Nabs <[email protected]>
Co-authored-by: Vladimir Glafirov <[email protected]>
Co-authored-by: AidenGeunGeun <[email protected]>
Co-authored-by: Mark <[email protected]>
2026-07-14 09:58:18 -05:00

18 lines
474 B
TypeScript

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