Skip to content

detecting missing blank lines before section headers #47

@keewis

Description

@keewis

At the moment, this:

paragraph

Section
-------
section content

is parsed to (document (paragraph) (section (title)) (paragraph)).

However, mistakenly omitting the blank line:

paragraph
Section
-------
section content

is parsed to (document (paragraph)), where the paragraph contains a node for each word and every single adornment character.

If we were to change the first line to a definition list:

term : classifier
    definition
Section
-------
section content

the parsed result would contain a error node:

(document (ERROR (list_item (term) (classifier) (definition (paragraph)))))

For comparison, with the blank line, the document parses as

(document (definition_list (list_item (term) (classifier) (definition (paragraph)))) (section (title)) (paragraph))

Would it be possible to always create an error node if there is a blank line missing before a section? If not, what kind of query would I need to use to detect something like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions