Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ranile/yew-md

Yew library for markdown parsing
https://github.com/ranile/yew-md

Last synced: about 1 month ago
JSON representation

Yew library for markdown parsing

Awesome Lists containing this project

README

        

# `yew-md`

`yew-md` is a Yew library for markdown parsing. It uses

- [`pulldown-cmark`](https://github.com/raphlinus/pulldown-cmark/) for markdown parsing to HTML
- [`syntect`]() for syntax highlighing (support coming in future)

## Installation

To add yew-md to your project, include it in your `Cargo.toml` file

```toml
[dependencies]
yew-md = "0.1"
```

### Features

- `syntax-highlighting`
Enables syntax highlighting using `syntect`

## Usage

You can use the `markdown` component to parse markdown from your html.

### Example

```rust
let input = "
# Hello world

This is a ~~complicated~~ *very simple* example.
";

html! {

}
```

## Configuration

### Parser options

An `Options` object can be passed to `options` prop to customize the parser's options. By
default, `ENABLE_STRIKETHROUGH` option is enabled.

```rust
html! { }
```

### Syntax Highlighting

Coming soon:tm: