Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mamal72/rtl-md

:pencil: A simple markdown to html converter which knows the direction!
https://github.com/mamal72/rtl-md

markdown persian rtl

Last synced: 3 months ago
JSON representation

:pencil: A simple markdown to html converter which knows the direction!

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/mamal72/rtl-md.svg?branch=master)](https://travis-ci.org/mamal72/rtl-md)
[![npm version](https://badge.fury.io/js/rtl-md.svg)](https://badge.fury.io/js/rtl-md)
# rtl-md
**rtl-md** is a markdown parser with RTL languages detection. This module converts the `Markdown` to `HTML` and fixes the elements direction based on the contents of them. This module made in order to help users publish their RTL markdown contents easily, without having to write boring HTML. Now, I can write and publish my `README.md` files in RTL languages too just like LTR languages!

# Installation
```bash
npm install --save rtl-md
```

# Usage
```js
import rmd from 'rtl-md';
const md = `# Some Markdown!
## Some english ltr stuff here and then, some rtl maybe.

بنی آدم اعضای یکدیگرند

که در آفرینش ز یک گوهرند

[سعدی شیرازی](https://en.wikiquote.org/wiki/Saadi)
`
const html = rmd(md);

// The output
/*

Some Markdown!


Some english ltr stuff here and then, some rtl maybe.


بنی آدم اعضای یکدیگرند


که در آفرینش ز یک گوهرند


سعدی شیرازی


*/
```

# Ideas || Issues
Just fill an issue and describe it. I'll check it ASAP!

# Contribution
You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. :heart:

Remember to lint your code before sending pull requests. Run the Grunt lint task with the following command and fix the lint errors if you get any.
```bash
grunt lint
```