[Haddock] [haddock] #252: HTML codes and emphasized blocks

haddock haddock at projects.haskell.org
Fri Aug 9 13:43:02 BST 2013

#252: HTML codes and emphasized blocks
Reporter:  DanielDiaz  |       Owner:     
    Type:  defect      |      Status:  new
Priority:  minor       |   Milestone:     
 Version:  2.11.0      |    Keywords:     
 By request, I copied below an e-mail I sent to David Waern about an issue
 with Haddock.


 These are the HTML output of two docs written in Haddock syntax.

 Yes, I κ.

 <p>Yes, I &#954;.</p>

 Yes, I /&#954;/.

 <p>Yes, I <em>&amp;#954;</em>.</p>

 Therefore, my question is, why is the ampersand escaped when it is inside
 the emphasis block, but it is not when outside? Is this consistent? I
 really would like to be able to emphasize characters written as HTML

 I guess that this is happening because inside an emphasis block no Haddock
 parsing is done, since I noticed that inline code blocks (@...@) do not
 work either, which forces me to do things like:

 /The command /@foo@/ does not work./

 Not a big issue, because at least is possible to get the correct output.
 However, the same cannot be said about HTML codes.

 Another note: I think this could imply a drastic change in the Haddock
 parser, but it would be great if I would not need to emphasize a text
 line-by-line. Let me explain myself with an example. I would like to

 -- /I divided this emphasized
 -- text in multiple lines
 -- because it was too long for
 -- a single line./

 Instead of:

 -- /I divided this emphasized/
 -- /text in multiple lines/
 -- /because it was too long for/
 -- /a single line./

Ticket URL: <http://trac.haskell.org/haddock/ticket/252>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool

More information about the Haddock mailing list