Converts a parsed diagram against its rendered SVG.
Separate from createMaidrFromMermaid so a caller that already holds
the parsed diagram -- or a test with a stand-in database -- need not parse
again.
A drawing Mermaid sized to its container is given the width it was drawn
at, so MAIDR's figure draws it at Mermaid's size, and every drawing is
padded inside that size so MAIDR's focus ring covers none of it.
The adapter's own words are written in options.language, or else in the
language MAIDR speaks to the reader. A figure made here does not follow a
change of language; one made by createMaidrFromMermaid, which can
parse the diagram again, does.
Error when the diagram type is not one the adapter reads. A
diagram of a type it reads but with nothing in it becomes a figure with
no layers, which MAIDR announces as empty
Converts a parsed diagram against its rendered SVG.
Separate from createMaidrFromMermaid so a caller that already holds the parsed diagram -- or a test with a stand-in database -- need not parse again.
A drawing Mermaid sized to its container is given the width it was drawn at, so MAIDR's figure draws it at Mermaid's size, and every drawing is padded inside that size so MAIDR's focus ring covers none of it.
The adapter's own words are written in
options.language, or else in the language MAIDR speaks to the reader. A figure made here does not follow a change of language; one made by createMaidrFromMermaid, which can parse the diagram again, does.