Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johannhof/markdown.rs
Rust Markdown parsing library
https://github.com/johannhof/markdown.rs
Last synced: about 2 months ago
JSON representation
Rust Markdown parsing library
- Host: GitHub
- URL: https://github.com/johannhof/markdown.rs
- Owner: johannhof
- License: apache-2.0
- Created: 2014-09-17T05:51:25.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-04-16T18:22:18.000Z (over 2 years ago)
- Last Synced: 2024-06-20T08:28:51.836Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 180 KB
- Stars: 136
- Watchers: 3
- Forks: 44
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
markdown.rs [![](https://img.shields.io/crates/v/markdown.svg)](https://crates.io/crates/markdown)
===========A simple native Rust library for parsing Markdown and (outputting HTML).
Usage
----------To include markdown in your project add the following to your Cargo.toml:
```toml
[dependencies]
markdown = "0.3"```
Now you can use the crate in your code with
```rust
extern crate markdown;
```There is no full documentation right now, the only function exported by the library is `to_html`, which takes a markdown `&str` and converts it to an owned `String` containing html.
```rust
let html : String = markdown::to_html("__I am markdown__");assert_eq!(&html, "I am markdown")
```TODO
----------- [ ] Inline HTML
- [ ] Automatic Links
- [ ] Obscure Emails## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as above, without any additional terms or
conditions.