Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-MYST-097

Code fences and front matter are read the same way everywhere

When the extension reads a Markdown source to render it, to anchor a review comment, to resolve a link fragment or to list label targets, it SHALL find a code fence only at up to three spaces of indent, close it only with a fence of the same mark, at least as long, followed by nothing but white space, and find the front matter only as a first-line "---" marker closed by a "---" or "..." line, so that every one of them sees the same lines as code or front matter.

Part of StRS-MDOKFSTUDIO-CORE-001, outside the paths drawn on its map.

Scenarios 3

The situations the tests check; open one to read it.

nominalA fence ends only at a matching closing fence
Givena source with a ```` ``` ```` fence closed by a line of three backticks and a label, a comment target or an alert after it
Whenthe preview renders, a comment is anchored or a link fragment is resolved
Thenthe lines inside the fence are code for each of them and the lines after it are content
boundaryIndent, info string, length and mark
InputOutcome
A fence indented by four spaces or morenot a fence; the line is content
A closing line with an info string (```` ```js ````)does not close the fence
A closing fence shorter than the opening one, or of the other markdoes not close the fence
A closing fence longer than the opening one, or with trailing spacescloses the fence
boundaryFront matter
InputOutcome
`---` on the first line, closed by `---` or `...` (trailing spaces allowed)the lines between are front matter, not content
An opening `---` that is indented, or never closednot front matter; the lines are content
An indented closing markerdoes not close the front matter

Implemented in 1

Tested by 1