mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-22 00:45:12 -10:00
+20







![opencode-agent[bot]](/assets/img/avatar_default.png)
634386fe0f
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]>
18 lines
474 B
TypeScript
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
|