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

https://github.com/anishlearnstocode/md-to-html-parser

This is a markdown parser that returns valid html code for any valid markdown text.
https://github.com/anishlearnstocode/md-to-html-parser

html markdown md parser

Last synced: 2 months ago
JSON representation

This is a markdown parser that returns valid html code for any valid markdown text.

Awesome Lists containing this project

README

          

# Markdown to HTML Parser

As the name makes evidently clear. This project is a markdown to html parser.

It takes in valid markdown strings and will return a valid html snippet.

## Examples

### Bold
```markdown
this is markdown for representing text in __bold__
```
this is markdown for representing text in __bold__

The output in html will be
```html
this is markdown for representing text in bold
```

### Italics
```markdown
this is markdown for representing text in _italics_
```
this is markdown for representing text in _italics_

The output in html will be
```html
this is markdown for representing text in bold
```

### Strike Through
```markdown
this is markdown for representing text in ~strikethrough~
```
this is markdown for representing text in ~~strikethrough~~

The output in html will be
```html
this is markdown for representing text in strikethrough
```

### Block Quotes
```markdown
> This is a blockquote text
```

```html

This is a blockquote text

```

### Ordered Lists
```markdown
Ordered List
1. point 1
1. point 2
1. point 3
```

```html

Ordered List



  1. point 1

  2. point 2

  3. point 3


```

### Unordered Lists
```markdown
Unordered Lists
- apples
- bananas
- tomatoes
```

```html

Unordered List



  • apples

  • bananas

  • tomatoes


```

### Code
```markdown
`let i = 10;`
```

```html
let i = 10;
```

### Fenced Code Block
```text
``java
package trees;

public class PreorderTraversal {
public static void main(String[] args) {
Tree root = new Tree();
root.input();
root.print();

preOrder(root);
}

private static void preOrder(Tree root){
if(root == null)
return;

System.out.print(root.data + " ");
preOrder(root.left);
preOrder(root.right);
}
}
``
```

```html


package trees;

public class PreorderTraversal {
public static void main(String[] args) {
Tree root = new Tree();
root.input();
root.print();

preOrder(root);
}

private static void preOrder(Tree root){
if(root == null)
return;

System.out.print(root.data + " ");
preOrder(root.left);
preOrder(root.right);
}
}

```

### Horizontal Rule
```markdown
---
```

```html



```

### Link
```markdown
[Google](https://www.google.com)
```

```html
Google
```

### Images
```markdown
![alt-text](image-path)
![banana](https://raw.githubusercontent.com/anishLearnsToCode/fruit-stall-poster/master/assets/banana.jpg)
```

```html
banana
```

### Tables
```markdown
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | amazing | $12 |
| col 3 is | 😀😀 | $1 |
```

```html



Tables
Are
Cool



col 1 is
left-aligned
$1600


col 2 is
amazing
$12


col 3 is
😀😀
$1

```