GithubHelp home page GithubHelp logo

mdtohtml's Introduction

mdToHtml

a simple md to html converter. why? because i want to without relying on a random npm package

goal:

to make a simple js file that you can call with 1 simple input, which is the file, and will easily return html elements.

example:

input:
example.md
|
| # title
| text
|
| <br/>
|
| ## title 2
| more text
|
| <br/>
|
| _italic text_
| _more italic text_
|
| <br/>
|
| **bold text**
| **moar bold text**
|
| <br/>
|
| [link name](external_link)
|
| <br/>
|
| 1. ol 1
| 1. ol 2
| 1. ol 3
|
| <br/>
|
| - ul 1
| - ul 2
| - ul 3
|
| <br/>
|
| ---
| \*\*\*
|
| <br/>
|
| `code`
|
| <br/>
|
| [image](image.png)

output:

<div class="convertedMd">
    <h1> title </h1>
    <p> text </p>
    <br/>
    <h2> title 2 </h2>
    <p> more text </p>
    <br/>
    <i> italic text </i>
    <i>_more italic text_</i>
    <br/>
    <b> bold text </b>
    <b> moar bold text </b>
    <br/>
    <a href="external_link"> link name </a>
    <br/>
    <ol>
        <li> ol 1 </li>
        <li> ol 2 </li>
        <li> ol 3 </li>
    </ol>
    <br/>
    <ul>
        <li> ul 1 </li>
        <li> ul 2 </li>
        <li> ul 3 </li>
    </ul>
    <br/>
    <hr/>
    <hr/>
    <code> code </code>
    <br/>
    <img src="image.png" alt=image />
</div>

mdtohtml's People

Contributors

vulbyte avatar

Stargazers

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