Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blazood/mdbook-regex-replacer

this is a preprocessor which invoke regex.replace_all() to replcae all chapter content
https://github.com/blazood/mdbook-regex-replacer

Last synced: about 2 months ago
JSON representation

this is a preprocessor which invoke regex.replace_all() to replcae all chapter content

Awesome Lists containing this project

README

        

# mdbook-regex-replacer
> this is a preprocessor which invoke regex.replace_all() to replcae all chapter content

## quick start

### install mdbook-regex-replacer

```shell script
cargo install mdbook-regex-replacer
```

### configure book.toml

```toml
[book]
authors = ["blazh"]
language = "en"
multilingual = false
src = "src"
title = "test"

# add into your book.toml
[preprocessor.regex-replacer]
command="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
[[preprocessor.regex-replacer.items]]
regex="==(?P.+?)=="
rep="$c"

```