Skip to content
#

haskell-library

Here are 340 public repositories matching this topic...

isovector
isovector commented Apr 27, 2021

Markdown and plaintext have different semantics wrt newlines. The current semigroup instance simply coerces plaintext to markdown, but this breaks newlines. A more correct solution would be to do something like this for any plaintext arguments that are being transformed into markdown:

forceMarkdownNewlines :: String -> String
forceMarkdownNewlines = unlines . fmap (<> "  ") . lines
treffynnon
treffynnon commented Mar 13, 2019

OK, so there are no tests here to cheat from and I found if I passed in an Int to the Prettier functions (as the docs currently read to me) they'd both reject it.

This is what I've come up with to get it working, but I figure I've probably taken a detour somewhere:

import qualified Waargonaut.Encode as WE
import qualified Waargonaut.Prettier as WEP
import qualified Waargonaut

Improve this page

Add a description, image, and links to the haskell-library topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the haskell-library topic, visit your repo's landing page and select "manage topics."

Learn more