https://github.com/vaishnavme/markast
markast is javascript script that helps you convert between different markup formats — Markdown, JSON (AST), and HTML.
https://github.com/vaishnavme/markast
ast markdown parser
Last synced: 2 months ago
JSON representation
markast is javascript script that helps you convert between different markup formats — Markdown, JSON (AST), and HTML.
- Host: GitHub
- URL: https://github.com/vaishnavme/markast
- Owner: vaishnavme
- Created: 2025-07-31T16:58:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T17:37:09.000Z (11 months ago)
- Last Synced: 2025-07-31T20:39:25.810Z (11 months ago)
- Topics: ast, markdown, parser
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Markast
**markast** is javascript script that helps you convert between different markup formats — Markdown, JSON (AST), and HTML.
This project is built to understand how parsers and abstract syntax trees (ASTs) work
It’s not meant to be a production-ready tool — it’s a **learning experiment** to dig deeper into:
- Parsing line-based and inline text structures
- Creating and transforming ASTs
- Working with regex and tokenization
- Building modular parsing systems
### Features
**Markdown to JSON**
Supported syntax
- [x] heading
- [x] paragraph
- [x] link
- [x] image
- [x] list (ordered/un-ordered)
- [x] blockquote
- [x] code
- [x] codeblock
**Upcoming**
- JSON to Markdown
- HTML to Markdown
### API Docs
```js
const markast = new Markast();
markast.toJSON(inputString); // converts markdown to JSON (AST)
```