Skip to content

Tfoedy/markdown-transpiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown Transpiler

Program for lexing, parsing and rendering given Markdown file into an HTML file.

Uses some C++20 features.

Feature subset & support

This Transpiler supports:

  • headings

  • emphasis
  • italics
  • quotes with parsing

  • code spans:
std::cout << "Hello World!\n";
  • inline code snippets
  • nested inline elements
  • lists
    • nested lists
      • more nested lists
  • links
  • images:

images

This project loosely follows the CommonMark specification. Not everything is supported, as I never intended for it to be fully feature-complete. There are likely numerous edge cases this transpiler fails to account for, and it is by no means a real implementation of the specification.

Usage

Command line:

markdowntranspiler <input_markdown_filename> (output_filename) [--only-body] [--no-styling]
  • --only-body - render HTML with just the body part
  • --no-styling - render HTML without any styling

It's also possible to drag a Markdown file onto the markdowntranspiler binary in a GUI file manager.

Building

Requirements:

  • C++20 compiler
  • CMake (>= 3.31)

You can either use the cmake-gui tool to generate a solution for your desired IDE (E.g. on Windows for Visual Studio) or, in the root project directory do:

> mkdir build
> cmake -B build
> make -C build

which will compile the binary markdowntranspiler in the build directory.

License

This project uses the MIT license.

Done as the final project for the 1st semester at my University.

About

Program for lexing, parsing and rendering given Markdown file into an HTML file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published