Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markdown-it-rust/markdown-it-plugins.rs
A markdown-it.rs plugin to process front matter containers
https://github.com/markdown-it-rust/markdown-it-plugins.rs
markdown-it-plugin
Last synced: 3 days ago
JSON representation
A markdown-it.rs plugin to process front matter containers
- Host: GitHub
- URL: https://github.com/markdown-it-rust/markdown-it-plugins.rs
- Owner: markdown-it-rust
- License: apache-2.0
- Created: 2023-06-14T00:00:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-04T17:26:15.000Z (about 1 year ago)
- Last Synced: 2024-09-17T23:55:58.518Z (16 days ago)
- Topics: markdown-it-plugin
- Language: Rust
- Homepage:
- Size: 221 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-plugins.rs
Monorepo of plugins for [markdown-it.rs](https://crates.io/crates/markdown-it):
- [markdown-it-front-matter](crates/front_matter/README.md)
- [markdown-it-footnote](crates/footnote/README.md)
- [markdown-it-tasklist](crates/tasklist/README.md)
- [markdown-it-heading-anchors](crates/heading_anchors/README.md)
- [markdown-it-autolink](crates/autolink/README.md)
- [markdown-it-deflist](crates/deflist/README.md)
- [markdown-it-gfm](crates/gfm/README.md)More to come... (hopefully, many from [mdit-py-plugins](https://github.com/executablebooks/mdit-py-plugins))
Also utility crates:
- [github-slugger](crates/github_slugger/README.md)
- [gfm-autolinks](crates/gfm_autolinks/README.md)## Development
Feedback on the code is always welcome!
Use [pre-commit](https://pre-commit.com/) to run checkers and formatters before committing:
```bash
git add -A
pre-commit run --all
```## Release
Use [cargo-release](https://github.com/crate-ci/cargo-release) to release.
(maybe move to cargo-smart-release in the future)## Notes
For translating markdown-it plugins to rust, here are some useful notes:
- `state.bMarks[startLine] + state.tShift[startLine]` is equivalent to `state.line_offsets[line].first_nonspace`
- `state.eMarks[startLine]` is equivalent to `state.line_offsets[line].line_end`
- `state.sCount[line]` is equivalent to `state.line_offsets[line].indent_nonspace`
- `state.sCount[line] - state.blkIndent` is equivalent to `state.line_indent(state.line)`