aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/partial_label.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/partial_label.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/partial_label.rs')
-rw-r--r--src/construct/partial_label.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/construct/partial_label.rs b/src/construct/partial_label.rs
index 00d613a..1c1dcec 100644
--- a/src/construct/partial_label.rs
+++ b/src/construct/partial_label.rs
@@ -1,14 +1,17 @@
-//! Label occurs in [definition][] and label end.
+//! Label occurs in [definition][] and [label end][label_end].
//!
-//! They’re formed with the following BNF:
+//! ## Grammar
+//!
+//! Label forms with the following BNF
+//! (<small>see [construct][crate::construct] for character groups</small>):
//!
//! ```bnf
//! ; Restriction: maximum `999` codes allowed between brackets.
//! ; Restriction: no blank lines.
-//! ; Restriction: at least 1 non-space and non-eol code must exist.
-//! label ::= '[' *( label_text | label_escape ) ']'
-//! label_text ::= code - '[' - '\\' - ']'
-//! label_escape ::= '\\' [ '[' | '\\' | ']' ]
+//! ; Restriction: at least 1 `text` byte must exist.
+//! label ::= '[' *(label_byte | label_escape) ']'
+//! label_byte ::= code - '[' - '\\' - ']'
+//! label_escape ::= '\\' ['[' | '\\' | ']']
//! ```
//!
//! The maximum allowed size of the label, without the brackets, is `999`