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.
Gemfile
andGemfile.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.
- 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.
- Ruby >~ 3.2.4
- Bundler =2.6.3
To install MarkLeft, clone the repository and navigate to the project directory:
-
Clone the repository:
git clone https://github.com/yourusername/markdown-to-html.git cd markdown-to-html
-
Install the dependencies:
bundle install
The markleft-main.rb
file is a simple script that reads a Markdown file, tokenizes it, parses it, and generates HTML output.
-
Run the script:
ruby markleft-main.rb
-
Enter the name of the Markdown file when prompted.
The terminal.rb
file provides a Text User Interface (TUI) for selecting and processing Markdown files.
-
Run the script:
ruby terminal.rb
-
Follow the prompts to select a Markdown file and process it.
Given a sample Markdown file sample.md
:
This is a sample *Markdown* file
**bold** yippee!
We welcome contributions to enhance MarkLeft. Please fork the repository and submit pull requests with your improvements.
This project is licensed under the MIT License. See the LICENSE
file for details.
For any questions or feedback, please contact contact@suvangs.tech.