-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support "lhs" as name for literate Haskell #4510
Comments
The behavior is exactly as documented in the manual, isn't it?
Nothing is said here about |
I think it's actually quite useful to have a way to do both of these things in a Markdown document:
|
Yeah, I guess you're right! It just bugs me, that it's not really correct markdown, or rather markdown which other parsers can easily handle. E.g. Commonmark will do this:
Which is not really what anyone wants, who writes this code... Other parsers completely mess it up: gettalong/kramdown#503 It would be cool if there was a more standard compliant way to differentiate between Haskell code which gets displayed and code which gets executed ... |
You could use a very simple lua filter to change code blocks
with class `lhs` to `literate haskell`, and use this when you're
converting using pandoc...
|
Well, for the time being I use this workaround to execute / compile the Haskell: cat document.md \
| sed 's/```haskell/```{.literate .haskell}/g' \
| pandoc \
--from markdown \
--to markdown+lhs \
--output temp.lhs \
| stack runhaskell \
--resolver lts-11.1 \
--package cmdargs \
-- \
temp.lhs \
; rm -f temp.lhs Not glamorous, but get's the job done =P. |
When converting markdown to markdown+lhs following 2 variants should yield the same output:
should both yield
The text was updated successfully, but these errors were encountered: