aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/thematic_break.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-16 13:04:38 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-16 13:04:38 +0200
commit93d0b7c6465f4ffe220b3ddada729746b11eb6ce (patch)
treee7907fb89a6660c5546d2ca128b2d48ec87539ae /src/construct/thematic_break.rs
parent2379c2749916483be68dbf816a4c56cd59ced958 (diff)
downloadmarkdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.tar.gz
markdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.tar.bz2
markdown-rs-93d0b7c6465f4ffe220b3ddada729746b11eb6ce.zip
Update some last docs, bnf grammars
Diffstat (limited to 'src/construct/thematic_break.rs')
-rw-r--r--src/construct/thematic_break.rs16
1 files changed, 12 insertions, 4 deletions
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
+//! (<small>see [construct][crate::construct] for character groups</small>):
//!
//! ```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 `<hr>`.
//! 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,