Markdown that would take too long to parse now gets a clear error
A small set of markdown shapes, such as thousands of unclosed links or emphasis markers in one paragraph, could make a conversion run for minutes. They now return a 400 with code markdown-too-complex and a hint saying what to change.
A few markdown shapes made the parser slow down far faster than the
document grew: thousands of [text]( links that never close, * or _
markers that never close, or a single paragraph holding many thousands of
code spans or HTML tags. A request like that could run for minutes and then
fail, even when the document was small.
Those documents are now checked before parsing and refused with 400 and
code markdown-too-complex. The response's rule names the construct that
made it expensive and hint says what to change: split the paragraph with
blank lines, close or escape the markers, or put the text in a fenced code
block. Ordinary documents are nowhere near the limit. This applies to
/api/v1/md, /api/v1/markdown, /api/v1/md/validate, text cards in
/api/v1/canvas, and the MCP markdown tools. A canvas board shares one
limit across all of its cards.
One rendering change comes with it: an emphasis or strikethrough span longer
than about 2,000 characters now stays as plain text with its markers, and a
bare URL longer than 4,096 characters is linked only up to that point. Wrap a
long URL in a [text](url) link to keep it whole. Limits are listed in the
API docs.