haskell - Haddock numbered list continuation -


how continue numbered list haddock documentation tool? following lines in haddock

--  1. first line. --  --  2. second line instructions  --  --     >>> command-linecmd param -- --  3. third line.. -- 

generate next html:

</p><ol><li> first line. </li><li> second line instructions  </li></ol><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong         class="userinput"><code>command-linecmd param </code></strong></pre><ol><li> third line.. </li></ol> 

this breaks numbering. there way make haddock continue third-number in html or should try other (>>> gives nice formatting, why i'd use it)?

you can't. you're using >>>. in order have rendered example, needs @ beginning of paragraph.

what's considered beginning of paragraph?

  • anything @ start of haddock comment, skipping white space preceding it.

  • anything following empty line.

in scenario have 4 paragraphs: list element, list element, example, list element. internally, haddock ignores list numbers you're putting down: start 999 if wanted to. when haddock sees consecutive paragraphs same type of list, joins them , numbers them. you're breaking pattern, lists not treated continuation. indenting >>> spaces there pointless in scenario stripped away we're in new paragraph. note spaces important if have consecutive examples: can put them in same paragraph long indentation identical.

other things have on own paragraph (and therefore break list order) lists, birdtracks, codeblocks (paragraph containing text between @s) , properties (prop>).

while solved allowing paragraph nesting, isn't planned. ticket #27 solely nesting lists (which happen paragraph-level entities) not solve problem.

i recommend use unordered lists if numbers aren't vital or cheat bit , use named lists ([name] content)

named , unordered list solutions

edit: of 12 january 2014, haddock ticket #27 has been resolved , possible indenting example 4 spaces after second list element. this:

1. first element  2. second element      >>> example     example result  3. third element 

now results in:

haddock nested list items http://fuuzetsu.co.uk/images/1389605057.png


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -