Merge pull request #162 from jm/add_literate_haskell Add literate Haskell renderer using literati
Ryan Tomayko rtomayko@gmail.com
Wed, 07 Nov 2012 20:55:42 -0800
4 files changed,
26 insertions(+),
0 deletions(-)
M
lib/github/markups.rb
→
lib/github/markups.rb
@@ -40,6 +40,10 @@ markup(:wikicloth, /mediawiki|wiki/) do |content|
WikiCloth::WikiCloth.new(:data => content).to_html(:noedit => true) end +markup(:literati, /lhs/) do |content| + Literati.render(content) +end + command(:rest2html, /re?st(\.txt)?/) command('asciidoc -s --backend=xhtml11 -o - -', /asc|adoc|asciidoc/)
A
test/markups/README.lhs
@@ -0,0 +1,10 @@
+# Markdown + +Except with more magic added. + +> isPrefixOf :: (Eq a) => [a] -> [a] -> Bool +> isPrefixOf [] _ = True +> isPrefixOf _ [] = False +> isPrefixOf (x:xs) (y:ys)= x == y && isPrefixOf xs ys + +And Haskell. A lot of Haskell.
A
test/markups/README.lhs.html
@@ -0,0 +1,11 @@
+<h1>Markdown</h1> + +<p>Except with more magic added.</p> + +<pre lang="haskell"><code>isPrefixOf :: (Eq a) => [a] -> [a] -> Bool +isPrefixOf [] _ = True +isPrefixOf _ [] = False +isPrefixOf (x:xs) (y:ys)= x == y && isPrefixOf xs ys +</code></pre> + +<p>And Haskell. A lot of Haskell.</p>