Skip to content

Multiline display math ($$...$$) not rendered #34656

Description

@8Nothing8

Description

Display math blocks with a newline between the delimiters don't render.

To reproduce: send this in a conversation:

$$\begin{aligned} \end{aligned}$$

The math appears as plain text. Removing the newline makes it work:

$$\begin{aligned}\end{aligned}$$

The regex in marked-katex-extension v5.1.6 doesn't match across newlines
(. without /s flag), so multiline $$ blocks fall through as regular text.

Environment: and web.

Plugins

No response

OpenCode version

1.17.11desktop

Steps to reproduce

1.send this in a conversation:
$$\begin{aligned}
\end{aligned}$$
The math appears as plain text.
2.Removing the newline makes it work:
$$\begin{aligned}\end{aligned}$$

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions