Skip to content

Missing requirement regarding code blocks in specs/doc #10

Closed

Description

@gingerbeardman

http://spec.commonmark.org/0.28/#indented-code-blocks

4.4 An indented code block is composed of one or more indented chunks separated by blank lines.

Specifically missing is the requirement that for markdown to be interpreted as a code block, it must be fenced also by blank lines.

FWIW, the code generated by CommonMark is valid. So this is just a documentation oversight.

glushchenko/fsnotes#125 (comment)

Activity

  1. jgm commented on Mar 15, 2018

    @jgm
    Member

    the requirement that for markdown to be interpreted as a code block, it must be fenced also by blank lines.

    But this isn't true.

    # Header
        code
    # Header
    

    gives you a code block. What is true is that an indented code block can't interrupt a paragraph. And that is documented, in the second paragraph of the section.

    An indented code block cannot interrupt a paragraph, so there must be a blank line between a paragraph and a following indented code block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions