The Markdown a schema's comments are written in, as HTML -- a small, fixed subset, so that every implementation renders a comment the same:
- blocks: paragraphs, separated by a blank line; a bullet list,
each item a line starting
-; a numbered list, each item a line starting1.(any number). An item continues on the lines below it that are indented. - inline:
`code`,**strong**,*emphasis*, and[text](https://...)links.
A code span that names a definition the documentation knows becomes a
link to it; link answers the address for a name, or nil. Everything
else is escaped and kept as written.
Summary
Functions
text with the characters HTML gives a meaning to escaped.
One line of text with its inline markup as HTML.
text as HTML, link resolving a code span to an address.
Functions
text with the characters HTML gives a meaning to escaped.
iex> Dextrin.Schema.Docs.Markdown.escape(~s(<a & "b">))
"<a & "b">"
One line of text with its inline markup as HTML.
iex> Dextrin.Schema.Docs.Markdown.inline("[guide](https://example.com) *now*", fn _ -> nil end)
~s(<a href="https://example.com">guide</a> <em>now</em>)
text as HTML, link resolving a code span to an address.
iex> Dextrin.Schema.Docs.Markdown.to_html("An **exact** `amount`.", fn _ -> nil end)
"<p>An <strong>exact</strong> <code>amount</code>.</p>"