Skip to content

Commit 2eeb0aa

Browse files
committed
Introduce a new grammar renderer
This adds an extension to mdbook-spec that will parse code-blocks in a BNF-style grammar into a rendered format, in both markdown or as railroad diagrams.
1 parent 65febd6 commit 2eeb0aa

File tree

7 files changed

+1325
-0
lines changed

7 files changed

+1325
-0
lines changed

mdbook-spec/Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mdbook-spec/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edition = "2024"
55
license = "MIT OR Apache-2.0"
66
description = "An mdBook preprocessor to help with the Rust specification."
77
repository = "https://github.com/rust-lang/spec/"
8+
default-run = "mdbook-spec"
89

910
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1011

@@ -15,6 +16,7 @@ once_cell = "1.19.0"
1516
pathdiff = "0.2.1"
1617
# Try to keep in sync with mdbook.
1718
pulldown-cmark = { version = "0.10.3", default-features = false }
19+
railroad = { version = "0.3.2", default-features = false }
1820
regex = "1.9.4"
1921
semver = "1.0.21"
2022
serde_json = "1.0.113"

0 commit comments

Comments
 (0)