mdbook-regex-replacer
this is a preprocessor which invoke regex.replace_all() to replcae all chapter content
quick start
install mdbook-regex-replacer
cargo install mdbook-regex-replacer
configure book.toml
[]
= ["blazh"]
= "en"
= false
= "src"
= "test"
# add into your book.toml
[]
="mdbook-regex-replacer"
# add your regex rule
# use crates regex
# https://crates.io/crates/regex
# https://docs.rs/regex/1.4.3/regex/#example-replacement-with-named-capture-groups
[[]]
="==(?P<c>.+?)=="
="<mark>$c</mark>"