🍄SpecBlocksFormatted

Formatted block is the most fundamental block in Mycomarkup. It represents a formatted text of the same significance.

Formatted block does not appear by itself. It is always part of something else. The most common container for Formatted is ../Paragraph. This is how a Paragraph containing a Formatted might look:

This is Formatted inside Paragraph.

Formatted has these types of elements inside. They are called spans, and are not found in any other blocks.

  • Text span is a sequence of unformatted text. A Formatted containing only one text span and nothing else is basically unformatted text.

  • Formatting markers that toggle formatting styles: italic, bold, highlight, underline, monospace, supertext, subtext, strike-through.

  • Inline links have a target and an optional displayed text. If there is no displayed text given by the writer, it is the same as target. Empty links are removed from the output.

Grammar:

Formatted ::=
   FormattedLine+
FormattedLine ::=
   Span+
Span ::=
   TextSpan | FormattingMarker | InlineLink
FormattingMarker ::=
   "**" | "//" | "++" | "__" | "^^" | ",," | "~~"
InlineLink ::=
   "[[" LWS "]]" # empty link
 | "[[" LWS LinkTarget LWS "]]" # link with target only
 | "[[" LWS LinkTarget LWS "|" LWS LinkDisplayedText LWS "]]" # link with both target and displayed text