Skip to content

Commit

Permalink
feat(HTML Encoding): Encode ids on nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Sep 8, 2021
1 parent 85710b0 commit 5e6ad57
Show file tree
Hide file tree
Showing 3 changed files with 411 additions and 288 deletions.
4 changes: 2 additions & 2 deletions rust/Cargo.toml
Expand Up @@ -45,7 +45,7 @@ import-github = []

decode-date = ["dtparse"]
decode-docx = ["decode-pandoc"]
decode-html = ["kuchiki", "markup5ever"]
decode-html = ["decode-md", "kuchiki", "markup5ever"]
decode-json = []
decode-latex = ["decode-pandoc"]
decode-md = ["pulldown-cmark", "nom", "coerce", "decode-html", "encode-txt"]
Expand All @@ -57,7 +57,7 @@ decode-toml = []
decode-yaml = []

encode-docx = ["encode-pandoc"]
encode-html = ["html-escape"]
encode-html = ["encode-txt", "html-escape"]
encode-json = []
encode-latex = ["encode-pandoc"]
encode-md = []
Expand Down
8 changes: 8 additions & 0 deletions rust/README.md
Expand Up @@ -59,6 +59,8 @@ cargo install sccache
export RUSTC_WRAPPER=sccache
```

> 📢 It is likely that we will split off some of the modules (e.g. `methods/encode`) into their own sub-crate to improve compile times further.
### Testing

We make extensive use of Rust feature flags. The main benefit of this is reduced compile times during development. To take advantage of this use the Cargo options `--no-default-features` (to turn off all the default features) and `--features` (to turn on the features that you are currently working on).
Expand All @@ -75,6 +77,12 @@ You should get faster compile times using this:
cargo test --no-default-features --features=compile-code-r compile::code::r
```

This approach is particularly useful when using `cargo watch`, for example to run the encode-decode ("ende") roundtrip integration test for HTML only when any source file changes:

```sh
cargo watch -x "test --no-default-features --features encode-html,decode-html --test ende html"
```

### Benchmarking

Run benchmarks using,
Expand Down

0 comments on commit 5e6ad57

Please sign in to comment.