Skip to content

Compiler build on ruby to compile gh-flavor and more markdown to html for the web to render

License

Notifications You must be signed in to change notification settings

greeenboi/markdown-superset-compiler

Repository files navigation

MarkLeft: A Superset to Markdown-to-HTML Compilers

image

Overview

MarkLeft is a powerful and flexible tool designed to extend the capabilities of traditional Markdown-to-HTML compilers. It introduces additional syntax and features to enhance the expressiveness and functionality of Markdown documents.

Project Structure

  • Gemfile and Gemfile.lock: Manage gem dependencies.
  • markleft-main.rb: Script for converting Markdown to HTML.
  • terminal.rb: TUI for converting Markdown to HTML.
  • lib/: Contains the tokenizer, parser, and generator classes.

Features

  • Extended Syntax: Supports additional formatting options such as bold, italics, and more.
  • Custom Nodes: Allows the creation of custom nodes to represent different types of content.
  • Tokenization and Parsing: Efficiently tokenizes and parses Markdown content into a structured node tree.
  • Easy Integration: Can be easily integrated into existing projects and workflows.

Prerequisites

  • Ruby >~ 3.2.4
  • Bundler =2.6.3

Installation

To install MarkLeft, clone the repository and navigate to the project directory:

  1. Clone the repository:

    git clone https://github.com/yourusername/markdown-to-html.git
    cd markdown-to-html
  2. Install the dependencies:

    bundle install

Running the Converter

Using markleft-main.rb

The markleft-main.rb file is a simple script that reads a Markdown file, tokenizes it, parses it, and generates HTML output.

  1. Run the script:

    ruby markleft-main.rb
  2. Enter the name of the Markdown file when prompted.

Using terminal.rb (TUI)

The terminal.rb file provides a Text User Interface (TUI) for selecting and processing Markdown files.

  1. Run the script:

    ruby terminal.rb
  2. Follow the prompts to select a Markdown file and process it.

Example

Given a sample Markdown file sample.md:

This is a sample *Markdown* file
**bold** yippee!

Contributing

We welcome contributions to enhance MarkLeft. Please fork the repository and submit pull requests with your improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or feedback, please contact contact@suvangs.tech.


About

Compiler build on ruby to compile gh-flavor and more markdown to html for the web to render

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages