From 93d0b7c6465f4ffe220b3ddada729746b11eb6ce Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 16 Aug 2022 13:04:38 +0200 Subject: Update some last docs, bnf grammars --- src/construct/paragraph.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/construct/paragraph.rs') 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 +//! (see [construct][crate::construct] for character groups): //! //! ```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 `

` 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 `

` element in HTML. +//! See [*§ 4.4.1 The `p` element* in the HTML spec][html] for more info. +//! //! ## Tokens //! //! * [`Paragraph`][Name::Paragraph] -- cgit