[Haddock] [haddock] #201: Strip one leading blank from each line of a code block, if possible

haddock haddock at projects.haskell.org
Thu Apr 12 08:11:32 BST 2012


#201: Strip one leading blank from each line of a code block, if possible
------------------------+---------------------------------------------------
Reporter:  SimonHengel  |       Owner:        
    Type:  enhancement  |      Status:  new   
Priority:  major        |   Milestone:  2.10.0
 Version:  2.9.4        |    Keywords:        
------------------------+---------------------------------------------------
 Most people (including me) tend put a leading blank on each non-empty line
 of a code block.

 Say

 {{{
 -- > foobar
 }}}

 instead of

 {{{
 -- >foobar
 }}}

 (e.g. test-framework-th contains
 [http://hackage.haskell.org/packages/archive/test-framework-
 th/0.2.2/doc/html/src/Test-Framework-TH.html#defaultMainGenerator real
 world examples])

 The generated HTML documentation retains these leading blanks.  And if you
 copy&paste some example snippets from the documentation, you end up
 striping these leading blanks manually.

 This has annoyed me several times. So I suggest to strip (in the parser)
 exactly one leading blank from each non-empty line of a code block iff
 each non-empty line of that code block starts with a blank.

 In addition I'd adjust the default CSS to make up for the missing blank.

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


More information about the Haddock mailing list