Expand description
Doc → markdown.
The guarantee is a fixed point: parse(serialize(parse(s))) equals
parse(s) for any input. An edit/save cycle can therefore never drift,
which is the property an editor actually needs — stronger than pretty
output and weaker (honestly so) than byte-identical round tripping, which a
flat model cannot promise for arbitrarily nested CommonMark.
Escaping is deliberately narrow. Over-escaping is its own bug: escaping #
everywhere turns a #123 reference into \#123, which no reader matches.
So #, >, - and friends are escaped only at the start of a line, where
they would actually mean something.
Functions§
- serialize
- serialize_
at - The document as markdown, and where
atlanded in it. - serialize_
with serializewith the app’s own marks — seecrate::Marks.