Skip to content
/ parseum Public

Markdown Parser and Editor πŸ“ | Peggy.js, React, TailwindCSS, DaisyUI

License

Notifications You must be signed in to change notification settings

vikiru/parseum

Repository files navigation


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

  • 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

Unsupported Markdown Syntax

  • 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.

πŸ› οΈ Tech Stack

Backend:

Frontend:

Hosting:

Documentation:

Dev Tools:

πŸ“ Prerequisites

Ensure that the following dependencies are installed onto your machine by following the Setup Instructions.

⚑ Setup Instructions

  1. Clone this repository to your local machine.
git clone https://github.com/vikiru/parseum.git
cd parseum
  1. Download and install all required dependencies.
npm install

πŸ” Testing

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

πŸ“œ Available Scripts

  1. Start the app in the development environment.
npm run start
  1. Build the project files and optimize for production.
npm run build
  1. Lint all files and check if there are any issues, with ESLint.
npm run lint
  1. Fix all ESLint issues then format the files with Prettier.
npm run prettier
  1. Generate a parser using the defined grammar.pegjs file with Peggy.js.
npm run parser
  1. Run all tests.
npm test

✨ Acknowledgments

©️ License

The contents of this repository are licensed under the terms and conditions of the MIT license.

MIT Β© 2024-present Visakan Kirubakaran.

About

Markdown Parser and Editor πŸ“ | Peggy.js, React, TailwindCSS, DaisyUI

Resources

License

Stars

Watchers

Forks