Closed tchoutri closed 1 year ago
Thanks for the report! This is expected behavior, but it is somewhat tricky: The GHC parser (in Haddock mode) detects your list items as section headings, but they can't actually occur there as regular Haddock (only in export lists or named chunks), so Ormolu escapes them as per #837.
You can fix this by adding at least one extra space before the *
:
-- #### Language Extensions
--
-- * `OverloadedLists` allow us to use the `[list]` syntax for datatypes other than List, like Vector.
-- * `QuasiQuotes` enable us to write plain SQL and field names in a `[|quasi-quoter block|]`.
-- * The Deriving extensions give us more powerful typeclass derivation.
Ormolu should not modify this. Hope this helps!
Ah, that's a great explanation, thanks a bunch!
Describe the bug List items in Haddocks are getting escaped in the Haddocks of a source file.
What was
* List item
is now\* List item
.To Reproduce I cannot manage to make a self-contained reproducer, but I can consistently reproduce on a particular file:
ormolu Tutorial.hs
#### Language Extensions
sectionExpected behavior List items should not be escaped, because this breaks rendering.
Environment
Additional context None