using haddock markup in Description field

I like to use Haddock markup like bird track (>) and enumerations (*) in the Description field of a package. However I can't get it working, the mentioned markup is simply ignored. The content of the description field must be indented, is it unindented before passing to Haddock?

On Fri, 2008-02-29 at 20:03 +0100, Henning Thielemann wrote:
I like to use Haddock markup like bird track (>) and enumerations (*) in the Description field of a package.
Yep,
However I can't get it working, the mentioned markup is simply ignored.
Hmm, works for me: Description: foo . > bar . * baz And the generated html documentation displays the markup as expected. For some reason we decided on a .cabal file format where blank lines are ignored and one needs '.' on a line to signal a blank line. I'm highly tempted to change that unless someone has a compelling reason.
The content of the description field must be indented, is it unindented before passing to Haddock?
When the .cabal file is parsed the indenting is removed from the free-form fields. The description is written out to a temp file and passed to haddock as --prologue=${tmpfile}. Duncan

On Fri, 29 Feb 2008, Duncan Coutts wrote:
On Fri, 2008-02-29 at 20:03 +0100, Henning Thielemann wrote:
I like to use Haddock markup like bird track (>) and enumerations (*) in the Description field of a package.
Yep,
However I can't get it working, the mentioned markup is simply ignored.
Hmm, works for me:
Description: foo . > bar . * baz
And the generated html documentation displays the markup as expected.
For some reason we decided on a .cabal file format where blank lines are ignored and one needs '.' on a line to signal a blank line. I'm highly tempted to change that unless someone has a compelling reason.
Ah, that's the trick. Should be documented. I hoped to read about here: http://www.haskell.org/cabal/release/latest/doc/users-guide/x30.html#general...

On Sun, 2008-03-02 at 23:21 +0100, Henning Thielemann wrote:
On Fri, 29 Feb 2008, Duncan Coutts wrote:
On Fri, 2008-02-29 at 20:03 +0100, Henning Thielemann wrote:
I like to use Haddock markup like bird track (>) and enumerations (*) in the Description field of a package.
Yep,
However I can't get it working, the mentioned markup is simply ignored.
Hmm, works for me:
Description: foo . > bar . * baz
And the generated html documentation displays the markup as expected.
For some reason we decided on a .cabal file format where blank lines are ignored and one needs '.' on a line to signal a blank line. I'm highly tempted to change that unless someone has a compelling reason.
Ah, that's the trick. Should be documented. I hoped to read about here: http://www.haskell.org/cabal/release/latest/doc/users-guide/x30.html#general...
It is documented a few lines above: To get a blank line in a field value, use an indented "." It could probably be clearer though. I'm happy to accept a patch (darcs or informal). Though as I said before I think it'd be better to remove the "." thing entirely. Duncan
participants (2)
-
Duncan Coutts
-
Henning Thielemann