Parseum is a markdown parser and editor built utilizing Peggy.js which generates a parser from a defined Parsing Expression Grammar (PEG) file. Combining this parser with React, TailwindCSS, and DaisyUI, allows for the creation of a simple markdown to html parser and editor with the flexibility to grow and evolve as needed by updating the defined grammar file.
demo.mp4
- π Table of Contents
- π Features
- π οΈ Tech Stack
- π Prerequisites
- β‘ Setup Instructions
- π Testing
- π Available Scripts
- β¨ Acknowledgments
- Β©οΈ License
- Parsing of simple markdown syntax such as:
paragraph
header
horizontal rule
list
link
image
- formatting such as
italic
,bold
,bold italic
,code
,emphasis
- Partial extended markdown syntax support such as:
alternate header syntax
blockquotes
code block
comments
definition list
task list
- additional formatting syntax such as
subscript
,superscript
,strikethrough
,highlight
, etc
- Simple UI for a markdown editor allowing a user to enter markdown and view resulting html rendered in a side-by-side view
- Ability to save and clear markdown content to and from local storage
- Ability to grow and accomodate additional syntax by updating the defined grammar file
- Nested lists (and inclusion of other elements within lists)
- Nested blockquotes (with different levels)
- Tables
- Footnotes
- Reference Links
- Emoji Support (currently pasting emojis is supported, but for example
:joy:
does not return an emoji with its resulting unicode representation)
A comprehensive overview detailing all supported Markdown syntax can be located within the documentation under the Syntax Overview section. Each element has a dedicated page detailing an overview of what the element is and example input Markdown and resulting output HTML.
Backend:
Frontend:
Hosting:
Documentation:
- Docs are built using Docusaurus
- Search functionality provided by: docusaurus-lunr-search
- Analytics using Google Analytics
- Documentation site hosted via GitHub Pages
Dev Tools:
Ensure that the following dependencies are installed onto your machine by following the Setup Instructions.
- Clone this repository to your local machine.
git clone https://github.com/vikiru/parseum.git
cd parseum
- Download and install all required dependencies.
npm install
The comprehensive suite of tests for this project is housed within the test directory. These tests are primarily designed to verify the functionality of the parser and ensure that the resulting HTML is as expected for the input Markdown.
The tests can be run with the following command:
npm test
- Start the app in the development environment.
npm run start
- Build the project files and optimize for production.
npm run build
- Lint all files and check if there are any issues, with ESLint.
npm run lint
- Fix all ESLint issues then format the files with Prettier.
npm run prettier
- Generate a parser using the defined
grammar.pegjs
file with Peggy.js.
npm run parser
- Run all tests.
npm test
- Peggy.js
- Peggy.js Online Editor
- Peggy.js Documentation
- Markdown Guide Cheatsheet
- regex101
- Surge.sh
- Docusaurus
- GitHub Pages
- Shields Badges
- Favicon Generator
The contents of this repository are licensed under the terms and conditions of the MIT license.
MIT Β© 2024-present Visakan Kirubakaran.