Markdown

Just convert Markdown (http://daringfireball.net/projects/markdown/syntax) to HTML

IN

Hello!
---

**Glad to see you!**  
*Golf Coding is so cool :)*

OUT

<h2>Hello!</h2><p><strong>Glad to see you!</strong><br><em>Golf Coding is so cool :)</em></p>

IN

 - **Glad to see you!**
 - *Golf Coding is so cool :)*
----------
Hello!
# Heading #

OUT

<ul><li><strong>Glad to see you!</strong></li><li><em>Golf Coding is so cool :)</em></li></ul><hr><p>Hello!</p><h1>Heading</h1>

IN

1. one
2. two
2. three
1. four
765. five
1337. six

OUT

<ol><li>one</li><li>two</li><li>three</li><li>four</li><li>five</li><li>six</li></ol>

IN

[JAGC](http://jagc.org)
![JAGC](http://jagc.org/images/logo_h.png)

OUT

<p><a href="http://jagc.org">JAGC</a><br><img src="http://jagc.org/images/logo_h.png" alt="JAGC"></p>
Login to submit solution


147 symbols pyth
Sat Oct 29 20:48:48 2016 Sait2000
.v.ZCim-i%Vd[16K64K)KJ5628cCM"ᗽ⼕秵⺓㻹檻㩨늃㜩盈蒗䟠诙ꡮ裤㛭筮퐅뛉芚榹憍덇≩섛閯䖠癞곐㑹媴Ἂ媇嬭ᮡ靣⊧豞쇜낥ꅙ繘櫥侑岎꽄ᷥ豞苐䵹俀픅羧餞驜鍋跥㌏酮ꅸ㯫䲘⥷毰쉀寞塧塔枟㹰䒝ⴭ䯏䒣魪懀ꬎ䢑꺍媿背뻎筢狒ᨣ狡ꊁ㌏焆ꑕ”裊쏿㬠穒弯괿간熗繪荁啠亮◃쾬싣둙쿳ꖾ⤍徭莎"3*J9
149 symbols pyth
Sat Oct 29 20:24:35 2016 Sait2000
.v.ZCim-i%Vd[16=T64T)T=T5628cCM"ᗽ⼕秵⺓㻹檻㩨늃㜩盈蒗䟠诙ꡮ裤㛭筮퐅뛉芚榹憍덇≩섛閯䖠癞곐㑹媴Ἂ媇嬭ᮡ靣⊧豞쇜낥ꅙ繘櫥侑岎꽄ᷥ豞苐䵹俀픅羧餞驜鍋跥㌏酮ꅸ㯫䲘⥷毰쉀寞塧塔枟㹰䒝ⴭ䯏䒣魪懀ꬎ䢑꺍媿背뻎筢狒ᨣ狡ꊁ㌏焆ꑕ”裊쏿㬠穒弯괿간熗繪荁啠亮◃쾬싣둙쿳ꖾ⤍徭莎"3*T9
150 symbols pyth
Sat Oct 29 20:21:14 2016 Sait2000
.v.ZCim-i%Vd[16=T64T)T=T5681cCM"飔邢䯄郮ꤡ粌擖枴㹗办늓⤵㎺硾뺊倠㳂挿⃖姏텐屰㈝웝媪株뀓흋ᯡ菨ᩏ塝혒煰퍧滬䐺껹잁륷벫䧄쒘쀁饁彌旅釅骊싹腡ᜆ㊞봏즍邍眾섇鮢稇묹ꋼᨿᨴ휴溏씿뇟磗컀ꬖ枫粑듬蚉䴜퉪萞䮯젓丆㍽舺は⽔䝙懃䇈唖밭峄拼詺澦ᰎ謉쇴䃐剆境⏦俼⎁頜ꉂ꽄蕁䑩쎊찷闂檞츢"3*T9
374 symbols perl
Mon Aug 25 22:17:17 2014 gabrielmad
#!/usr/bin/perl -p0
%h=qw/* em ** strong/;s,-{10}\n,<hr><p>,;s,(.+)\n---\n+(.+),<h2>$1</h2><p>$2</p>,s;s, - (.+?)\n,<li>$1</li>,g;s,(<li>.+</li>),<ul>$1</ul>,;s,!\[(.+)\]\((.+)\),<img src="$2" alt="$1"></p>,;s,\[(.+)\]\((.+)\),<p><a href="$2">$1</a>,;s,(\*+)(.+?)\1 *,<$h{$1}>$2</$h{$1}>,g;s,\n# (.+?) #,</p><h1>$1</h1>,;s,((\d+\..+)+),<ol>$1</ol>,s;s,\d+\. (\w+)\n?,<li>$1</li>,g;s,\n,<br>,
385 symbols perl
Mon Aug 25 11:51:31 2014 gabrielmad
#!/usr/bin/perl -p0
%h=qw/* em ** strong/;s,-{10}\n,<hr><p>,;s,(.+)\n---\n+((\n|.)+),<h2>$1</h2><p>$2</p>,;s, - (.+?)\n,<li>$1</li>,g;s,(<li>(.+)</li>),<ul>$1</ul>,;s,!\[(.+)\]\((.+)\),<img src="$2" alt="$1"></p>,;s,\[(.+)\]\((.+)\),<p><a href="$2">$1</a>,;s,(\*+)(.+?)\1 *,<$h{$1}>$2</$h{$1}>,g;s,\n# (.+?) #,</p><h1>$1</h1>,g;s,((\d+\.(.+)\n?)+),<ol>$1</ol>,;s,\d+\. (\w+)\n?,<li>$1</li>,g;s,\n,<br>,
397 symbols pyth
Sat Oct 29 20:18:34 2016 Sait2000
::::::::::::jb.z"-{10}
""<hr><p>""(?s)(.+)
---
+(.+)""<h2>\\1</h2><p>\\2</p>"" - (.+?)
""<li>\\1</li>""(<li>.+</li>)""<ul>\\1</ul>""!\[(.+)\]\((.+)\)""<img src=\"\\2\" alt=\"\\1\"></p>""\[(.+)\]\((.+)\)""<p><a href=\"\\2\">\\1</a>""\*\*(.+?)\*\* *""<strong>\\1</strong>""\*(.+?)\* *""<em>\\1</em>""
# (.+?) #""</p><h1>\\1</h1>""(?s)((\d+\..+)+)""<ol>\\1</ol>""\d+\. (\w+)
?""<li>\\1</li>""
""<br>"
405 symbols perl
Mon Aug 25 11:40:10 2014 gabrielmad
#!/usr/bin/perl -p0
%h=qw/* em ** strong/;s,-{10},<hr>,;s,(.+)\n---\n,<h2>$1</h2>,;s,\n(.+!)\n,<p>$1</p>,;s, - (.+?)\n,<li>$1</li>,g;s,(<li>(.+)</li>),<ul>$1</ul>,;s,!\[(.+)\]\((.+)\),<img src="$2" alt="$1"></p>,;s,\[(.+)\]\((.+)\),<p><a href="$2">$1</a>,;s,\n([^<\d]+),<p>$1</p>,;s,(\*+)(.+?)\1 *,<$h{$1}>$2</$h{$1}>,g;s,># (.+?) #,><h1>$1</h1>,g;s,((\d+\.(.+)\n?)+),<ol>$1</ol>,;s,\d+\. (\w+)\n?,<li>$1</li>,g;s,\n,<br>,
477 symbols perl
Sun Aug 10 20:28:39 2014 danieljabailey
#!/usr/bin/perl -npl
$\='';s/^([a-zH!]+)/<h2>$1<\/h2>/,$p=-1if($.==1);s/\*+(.+)\*\* */<strong>$1<\/strong>/;s/\*(.+)\*/<em>$1<\/em>/;s/\# (.+) \#/<\/p><h1>$1<\/h1>/;$_=$l?"$_<\/ul>":(($l=1),"<ul>$_")if(s/ - (.+)/<li>$1<\/li>/);$_=$u?$.>5?"$_<\/ol>":$_:(($u=1),"<ol>$_")if(s/\d+\. (.+)/<li>$1<\/li>/);$_.=$p>0?"</p>":"<br>",$p=-$p if($i);s/----+/<hr><p>/;$_=$i?"</p>":(($i=1),"<p>")if(/^$/);s/-+//;$u=qr/\[([A-Z]+)\]\((.*)\)/;s/!$u/<br><img src="$2" alt="$1"><\/p>/;s/$u/<p><a href="$2">$1<\/a>/
1227 symbols haskell
Tue Mar 17 14:13:44 2015 YoshikuniJujo
import Data.Char
b=0<1
(#)=(++)
f=dropWhile
type S=String
main=interact$w.p.r.lines
data M=H S|I S|P[M]|R S|E S|S S|U[M]|L M|O[M]|N S|Z|S:#S|S:&S|B
r[]=[]
r("":t)=r t
r(('#':' ':s):t)=H(head$words s):r t
r(('*':'*':s):t)=S(takeWhile(/='*')s):r t
r(('*':s):t)=E(init s):r t
r((' ':'-':s):t)=L(head$r[f(==' ')s]):r t
r(('-':_):t)=Z:r t
r(s@(i:_):t)|isDigit i=N(f isSpace.tail$f(/='.')s):r t
r(h:('-':_):t)=I h:r t
r(('[':s):t)=let(x,u)=a s in x:#u:r t
r((_:'[':s):t)=let(x,u)=a s in x:&u:r t
r(w:t)=R w:r t
a s=case span(/=']')s of(x,']':'(':u)->(x,init u)
q(R _)=b
q(S _)=b
q(E _)=b
q(_:#_)=b
q(_:&_)=b
q _=1<0
v(L _)=b
v _=1<0
y(N _)=b
y _=1<0
p[]=[]
p(h@(H _):s)=h:p s
p(i@(I _):s)=i : p s
p(Z:s)=Z:p s
p s@(L _:_)=let(r,t)=span v s in U r:p t
p s@(N _:_)=let(r,t)=span y s in O r:p t
p s=let(r,t)=span q s in P (k r):p t
k[x]=[x]
k(x:s)=x:B:k s
w[]=""
w(H h:m)=j"h1"h#w m
w(I i:m)=j"h2"i#w m
w(P m:t)=j"p"(w m)#w t
w(S t:m)=j"strong"t#w m
w(E e:m)=j"em"e#w m
w(U m:t)=j"ul"(w m)#w t
w(L m:t)=j"li"(w[m])#w t
w(O m:t)=j"ol"(w m)#w t
w(N m:t)=j"li"m#w t
w(Z:t)="<hr>"#w t
w(B:t)="<br>"#w t
w(R s:t)=s#w t
w(x:#u:t)="<a href=\""#u#"\">"#x#"</a>"#w t
w(x:&u:t)="<img src=\""#u#"\" alt=\""#x#"\">"#w t
j s t="<"#s#">"#t#"</"#s#">"

View all solutions