infra: correctly support preprocessors for nostarch

- Update the `tools/nostarch` script to `cargo install` each of the
  preprocessors so they are always available to run and do not require
  any manual intervention.
- Add support for `"markdown"` renderer in the preprocessors.
This commit is contained in:
Chris Krycho
2024-05-27 15:16:24 -06:00
parent e75fe2cf22
commit 60993ce66f
3 changed files with 10 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ impl Preprocessor for TrplListing {
}
fn supports_renderer(&self, renderer: &str) -> bool {
renderer == "html"
renderer == "html" || renderer == "markdown"
}
}

View File

@@ -49,7 +49,7 @@ impl Preprocessor for TrplNote {
}
fn supports_renderer(&self, renderer: &str) -> bool {
renderer == "html"
renderer == "html" || renderer == "markdown"
}
}

View File

@@ -4,6 +4,14 @@ set -eu
cargo build --release
cd packages/mdbook-trpl-listing
cargo install --locked --path .
cd ../mdbook-trpl-note
cargo install --locked --path .
cd ../..
mkdir -p tmp
rm -rf tmp/*.md
rm -rf tmp/markdown