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

https://github.com/bennyboer/md2letter

Markdown to Letter script converter
https://github.com/bennyboer/md2letter

markdown pdf text-layout

Last synced: about 1 month ago
JSON representation

Markdown to Letter script converter

Awesome Lists containing this project

README

          

# md2letter

Markdown to [Letter](https://github.com/bennyboer/letter) script converter.
Write your documents in Markdown and let [Letter](https://github.com/bennyboer/letter) do the heavy lifting of laying
out the document and optionally creating a PDF.

## Example

```
cd cli
cargo run -- example.md
```

Output (in Letter script format - **not HTML!**):

```html

This is a title

Here is a simple paragraph with

some

formatting


.


This is a subtitle



Item A


Item B



Hello


World



Item C



console.log('Hello World');

```

## Support

Currently we support the following Markdown features:

- Headings
- Paragraphs
- Mixed bold and italic formatting
- Code blocks (with language modifier) and inline code
- Lists (ordered and unordered) - nesting supported
- Quote blocks
- Horizontal rules
- Links
- Images
- Tables
- Letter functions - as block or inline - (e. g. `#break` or `#image(width: 100px, height: 100px, src: image.png)`)

The output format is currently the Letter script format **only**.
For more details check the Letter repository [here](https://github.com/bennyboer/letter).

## Parser pipeline

![Parser pipeline](assets/parser_pipeline.svg)