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/thematic_break.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/construct/thematic_break.rs') diff --git a/src/construct/thematic_break.rs b/src/construct/thematic_break.rs index 9496d98..0a8ebe9 100644 --- a/src/construct/thematic_break.rs +++ b/src/construct/thematic_break.rs @@ -1,20 +1,28 @@ -//! Thematic breaks, sometimes called horizontal rules, are a construct that -//! occurs in the [flow][] content type. +//! Thematic break occurs in the [flow][] content type. //! -//! They’re formed with the following BNF: +//! ## Grammar +//! +//! Thematic break forms with the following BNF +//! (see [construct][crate::construct] for character groups): //! //! ```bnf //! ; Restriction: all markers must be identical. //! ; Restriction: at least 3 markers must be used. //! thematic_break ::= *space_or_tab 1*(1*marker *space_or_tab) //! -//! space_or_tab ::= ' ' | '\t' //! marker ::= '*' | '-' | '_' //! ``` //! +//! As this construct occurs in flow, like all flow constructs, it must be +//! followed by an eol (line ending) or eof (end of file). +//! +//! ## HTML +//! //! Thematic breaks in markdown typically relate to the HTML element `
`. //! See [*§ 4.4.2 The `hr` element* in the HTML spec][html] for more info. //! +//! ## Recommendation +//! //! It is recommended to use exactly three asterisks without whitespace when //! writing markdown. //! As using more than three markers has no effect other than wasting space, -- cgit