-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move backend documentation out of readme
Since I'm still not sure whether I want this or not, it's best to keep it out of README.md At least it allows for finding inconsistencies the existing backend
- Loading branch information
1 parent
6bfa917
commit 85ee3d0
Showing
2 changed files
with
33 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Parsing backends | ||
|
||
egui_commonmark offers __experimental__ support for using [comrak](https://crates.io/crates/comrak) | ||
as parsing backend. By default pulldown_cmark is used. To use comrak instead do: | ||
|
||
```toml | ||
egui_commonmark = { version = "0.11", default-features = false, features = ["load-images", "comrak"] } | ||
``` | ||
|
||
### Why two parsing backends? | ||
|
||
egui_commonmark was originally implemented using pulldown_cmark, however comrak | ||
has stricter commonmark/github style markdown support. In addition it allows the | ||
crate to support more features than pulldown_cmark can offer with regards to github | ||
style markdown. | ||
|
||
pulldown_cmark has fewer dependencies and should theoretically be faster. | ||
|
||
Due to these reasons both backends are supported. At least for now. | ||
|
||
|
||
### Differences in support | ||
|
||
Currently both support the same feature set | ||
|
||
### Known rendering differences | ||
|
||
| Type | pulldown_cmark | comrak | | ||
|---------|----------------|--------| | ||
| Footers | Placed when they appear | Placed at the end | | ||
| Spec incompatibilies | Blocks such as images can be rendered inside tables. This is against the spec | Disallowed | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters