asciidoctor / atom-language-asciidoc

⚛ AsciiDoc language package for the Atom editor.
https://atom.io/packages/language-asciidoc
MIT License
42 stars 20 forks source link

Match normal paragraphs #125

Open mojavelinux opened 8 years ago

mojavelinux commented 8 years ago

In order to get the scoping of matches to be precise, we need to match all the block-level elements in the document. One of the main block-level elements is a normal paragraph. If we're able to match normal paragraphs, then we can limit the scope of inline matches such as formatted text.

I don't think we need to name the match since a paragraph should not be styled in any special way...though I suppose it won't hurt.

We should match a paragraph after we match other non-delimited block elements like admonition paragraphs, literal paragraphs (begins with space) and lists.

It's important to understand that an inline element cannot exist outside of a block. Therefore, we would only match inline elements once we've established which block we are in...and usually a paragraph block.

mojavelinux commented 8 years ago

A paragraph starts at the beginning of the line with a non-blank character.