We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb5862e commit 3778580Copy full SHA for 3778580
mdbook-spec/src/grammar.rs
@@ -136,7 +136,7 @@ impl Expression {
136
static GRAMMAR_RE: LazyLock<Regex> =
137
LazyLock::new(|| Regex::new(r"(?ms)^```grammar,([^\n]+)\n(.*?)^```").unwrap());
138
static NAMES_RE: LazyLock<Regex> =
139
- LazyLock::new(|| Regex::new(r"(?m)^([A-Za-z0-9_]+)(?: \([^)]+\))? ->").unwrap());
+ LazyLock::new(|| Regex::new(r"(?m)^(?:@root )?([A-Za-z0-9_]+)(?: \([^)]+\))? ->").unwrap());
140
141
/// Loads the [`Grammar`] from the book.
142
pub fn load_grammar(book: &Book, diag: &mut Diagnostics) -> Grammar {
0 commit comments