Expand description
CommonMark syntax facts every Markdown writer in the family needs.
Each library renders its own document model, and how it styles a run is its own business. Where an emphasis delimiter may stand, and how text the document supplies — a picture’s description, a link’s target — has to be written so that it stays inside the construct it belongs to, are not: they are properties of CommonMark, and a writer that gets them wrong prints its syntax as text. This module answers those questions once so the writers cannot drift on them.
std-only, like the rest of the crate root.
Functions§
- code_
span - A code span holding
textexactly as given: CommonMark reads it back astext, every line ending in it read as one space. - emphasis_
span - The part of a styled run that emphasis delimiters (
*,**,~~) can wrap, given the characters the run lands between, orNonewhen no part can. - image
- A picture as an inline image:
. - link
- An inline link:
[label](destination), or[label](destination "title"). - link_
destination - A link or image destination, written so that CommonMark reads back exactly
url(§6.3).