'How to force new line inside a table in Haddock (Haskell)
I need to make some documentation with a table that has a cell with two lines (It's code, so it needs to be on separated lines). However if I try
{-
+----------+------------------+
| Col1 | Col2 |
+==========+==================+
| One line | This should span |
| | Two lines |
+----------+------------------+
-}
It gives the same result as using
{-
+----------+---------------------------+
| Col1 | Col2 |
+==========+===========================+
| One line | This should spanTwo lines |
+----------+---------------------------+
-}
Is there a way to force a new line?
More importantly, what about code inside the table? Can I make it multiline?
Obviously this doesn't work
{-
+----------+------------------+
| Col1 | Col2 |
+==========+==================+
| One line | @This is code |
| | Other code line@|
+----------+------------------+
-}
The following works but, again, produces a cell with only one line:
{-
+----------+------------------+
| Col1 | Col2 |
+==========+==================+
| One line | @This is code@ |
| | @Other code line@|
+----------+------------------+
-}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
