haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 243 forks source link

Haddock incorrectly highlights text blocks in .hls files #1538

Open gnull opened 1 year ago

gnull commented 1 year ago

image

I see this after compiling an .lhs file using haddock and opening the source code view in my browser. Haddock tries to highlight Haskell syntax inside the literate text blocks, note the double quotes and "where" on the screenshot.

I thought it would be more reasonable to treat literate text blocks as comments, and highlight them as such. What do you think?

How hard would it be to make the change? And would you be interested to review a PR for it? (And if so, could you give me any pointers for the relevant parts of the code base?)

Ivan