2

Is there a way to get bold faced text when documenting Haskell source code with haddock markup? There is / / for emphasis, but nothing obvious for strong. I'm hoping for an elegant hack but I'll settle for a kludgy workaround...

AfC

Andrew Cowie
  • 100
  • 7

2 Answers2

1

Add '@' to your text and it will be bold:

Bold only one word, bold to the first delimiter like space and etc...

@text1 text2

here bold only text1 word.

Or wrap in bold some text:

@bold text examples in haddock@

0xAX
  • 20,957
  • 26
  • 117
  • 206
  • 1
    Hm. Don't think so, unless your version of haddock parses a newer version of the syntax. A single @ results in an error (ie, no documentation generated for that function), and @some_name@ results in ... (ie, monospaced), which is what I'd expect from http://www.haskell.org/haddock/doc/html/ch03s08.html §3.8.7 – Andrew Cowie Jan 01 '13 at 06:18
  • 2
    That's indeed wrong, there is no markup for bold. It's currently being implemented and will hopefully make it into 7.8. The markup will be `__This is some bold text__` – Mateusz Kowalczyk Aug 22 '13 at 20:34
1

This feature was pushed to HEAD yesterday.

The markup is __This is some bold text__. You don't need to escape single underscores.

Mateusz Kowalczyk
  • 2,036
  • 1
  • 15
  • 29