Skip to content

Latest commit

 

History

History
43 lines (37 loc) · 2.52 KB

span-types.md

File metadata and controls

43 lines (37 loc) · 2.52 KB

Span Types

Spans are inline text elements that either wrap string content or other spans. All span types derive from the base class MdSpan.

Types

  • MdTextSpan: The most common span type that represents plain text content.
    Note: All content of text spans will be escaped in the output, e.g. **text** will show up unchanged in the output and not be rendered as emphasized text.
  • MdCodeSpan represents a inline code span.
  • MdCompositeSpan is a utility span class that can be used to combine multiple spans into a single instance (most block types can only have a single content item)
  • MdEmphasisSpan represents emphasized text
  • MdStrongEmphasisSpan represents strongly emphasized text
  • MdImageSpan represents an inline image
  • MdLinkSpan represents a link element
  • MdRawMarkdownSpan: Raw markdown content that will be written to the output unchanged, i.e. the text will not be escaped and this span can thus be used to write markdown content and also inline html content to the output
  • MdSingleLineSpan is a span class that can be used to cause any other span to be written to the output wihtout line breaks. Spans for elements that only allow single line content (e.g. table cells or headings) will automatically be wrapped into a instance of MdSingleLineSpan

Implicit conversion from string

MdSpan defines an implicit converion from string. When converting from string, the content will be wrapped into an instance of MdTextSpan and thus be escaped.

To write a string to the output without escaping, use MdRawMarkdownSpan