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.
- Host: GitHub
- URL: https://github.com/anishlearnstocode/md-to-html-parser
- Owner: anishLearnsToCode
- Created: 2020-05-05T11:09:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-03T04:46:03.000Z (almost 6 years ago)
- Last Synced: 2025-07-10T08:03:25.681Z (12 months ago)
- Topics: html, markdown, md, parser
- Language: TypeScript
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
- point 1
- point 2
- 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


```
```html
```
### 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
```