Org writer: Add space before language name.

Closes #523.
This commit is contained in:
John MacFarlane 2012-05-29 16:27:19 -07:00
parent 60495e9fb3
commit 91e9d904b5

View file

@ -139,9 +139,9 @@ blockToOrg (CodeBlock (_,classes,_) str) = do
"ledger", "lisp", "matlab", "mscgen", "ocaml", "octave",
"oz", "perl", "plantuml", "python", "R", "ruby", "sass",
"scheme", "screen", "sh", "sql", "sqlite"]
let (beg, end) = if null at
then ("#+BEGIN_EXAMPLE", "#+END_EXAMPLE")
else ("#+BEGIN_SRC" ++ head at, "#+END_SRC")
let (beg, end) = case at of
[] -> ("#+BEGIN_EXAMPLE", "#+END_EXAMPLE")
(x:_) -> ("#+BEGIN_SRC " ++ x, "#+END_SRC")
return $ text beg $$ nest tabstop (text str) $$ text end $$ blankline
blockToOrg (BlockQuote blocks) = do
contents <- blockListToOrg blocks