diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-16 13:04:38 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-16 13:04:38 +0200 |
commit | 93d0b7c6465f4ffe220b3ddada729746b11eb6ce (patch) | |
tree | e7907fb89a6660c5546d2ca128b2d48ec87539ae /src/construct/paragraph.rs | |
parent | 2379c2749916483be68dbf816a4c56cd59ced958 (diff) | |
download | markdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.tar.gz markdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.tar.bz2 markdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.zip |
Update some last docs, bnf grammars
Diffstat (limited to 'src/construct/paragraph.rs')
-rw-r--r-- | src/construct/paragraph.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/construct/paragraph.rs b/src/construct/paragraph.rs index 5f89ef9..0ddd0c4 100644 --- a/src/construct/paragraph.rs +++ b/src/construct/paragraph.rs @@ -1,15 +1,18 @@ -//! Paragraph is a construct that occurs in the [flow] content type. +//! Paragraph occurs in the [flow][] content type. //! -//! They’re formed with the following BNF: +//! ## Grammar +//! +//! Paragraph forms with the following BNF +//! (<small>see [construct][crate::construct] for character groups</small>): //! //! ```bnf //! ; Restriction: lines cannot start other flow constructs. //! ; Restriction: lines cannot be blank. -//! paragraph ::= 1*line *( eol 1*line ) +//! paragraph ::= 1*line *(eol 1*line) //! ``` //! -//! Paragraphs in markdown relate to the `<p>` element in HTML. -//! See [*§ 4.4.1 The `p` element* in the HTML spec][html] for more info. +//! As this construct occurs in flow, like all flow constructs, it must be +//! followed by an eol (line ending) or eof (end of file). //! //! Paragraphs can contain line endings and whitespace, but they are not //! allowed to contain blank lines, or to be blank themselves. @@ -17,6 +20,11 @@ //! The paragraph is interpreted as the [text][] content type. //! That means that [autolinks][autolink], [code (text)][code_text], etc are allowed. //! +//! ## HTML +//! +//! Paragraphs in markdown relate to the `<p>` element in HTML. +//! See [*§ 4.4.1 The `p` element* in the HTML spec][html] for more info. +//! //! ## Tokens //! //! * [`Paragraph`][Name::Paragraph] |