Giter Club home page Giter Club logo

md-parser's Introduction

Markdown Parser Using Regex

A simple parser written using golang with the help of regex.

Problem:

  • Markdown has no support for <figure>
  • Anchor tag have different style class we need to explicitly specify via HTML in markdown.

Lot of copy pasta while working with the above tags in markdown files, so i wrote this project to automate the markdown files according to the custom rules we can overwrite for our own need! :D

Rules support:

1. Image with Figcaption

![venndiagram.png](venn diagram)(fig:hello)

to

<figure><img src="venndiagram.png" alt="venn diagram" class="post-img"/> <figcaption>hello</figcaption> </figure>

2. Anchor tag with class

Syntax of URN According to [tello](sd)

to

Syntax of URN According to <a href="tello" class="ahrefmd">sd</a>

3. Empty lines as Break

If a line is empty in markdown file, it will convert it to <br>

4. Emoji Support

4.1 Shorthand Emoji

:point 

to

4.2 Emoji as list

:tldr Point1
:tldr Point2
:tldr Point3

to

⭐ Point1 <br>
⭐ Point2 <br>
⭐ Point3 <br>

Installation

  1. Clone
git clone https://github.com/mystica2000/md-parser.git
  1. Build the Project
go build main.go
  1. Run (powershell on windows)
./main -src="hello.md" -desc="hello1.md" 
./main -src="hello.md" // src and desc will be same file
  1. To view help
./main -h

md-parser's People

Contributors

mystica2000 avatar

Stargazers

Julien Etienne avatar Roman avatar Kelvin Gandhi avatar Charlie Greenman avatar Simon avatar Nils avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.