stamby / md-to-html

Sed script that converts Markdown to HTML code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

md-to-html

Following John Gruber's Markdown syntax guide with some exceptions, listed below.

  • May not work well when numbered and unnumbered lists are combined.
  • Inline HTML is not supported yet.
  • Every word surrounded by two colons (:likethis:) is assumed to be an emoji and thus becomes a unicode star.
  • Links that are referenced by using brackets ([like this] [reference]) are not supported.

How to try this script

Run this from your terminal:

git clone https://github.com/stamby/md-to-html
cd md-to-html
./md-to-html.sed example.md > /tmp/example.html

Then open file:///tmp/example.html with your browser to see the result.

It also works this way on Bash:

./md-to-html.sed <<< '1. Hello!'

The output of that being:

<ol>
<li>Hello!</li>
</ol>

About

Sed script that converts Markdown to HTML code.

License:MIT License


Languages

Language:sed 100.0%