]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Inlining_adds_newlines_which_can_break_markdown.html
I would recommend using HTML here
[ikiwiki.git] / doc / bugs / Inlining_adds_newlines_which_can_break_markdown.html
1 I'm trying to put a list of tags in a table, so I carefully make a newline-free taglist.tmpl and then do:
2
3 <pre>
4 | [ [!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=taglist] ] |
5 </pre>
6
7 but there's a line in <pre>inline.pm</pre> that does:
8 <pre>
9         return "&lt;div class=\"inline\" id=\"$#inline\"&gt;&lt;/div&gt;\n\n";
10 </pre>
11
12 And the extra newlines break the table.  Can they be safely removed?
13
14 > If you want an HTML table, I would suggest using an HTML table, which
15 > should pass through Markdown without being interpreted further:
16 >
17 >     <table><tr>
18 >     \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=tagtd]]
19 >     </tr></table>
20 >
21 > where tagtd.tmpl is of the form `<td>your markup here</td>`.
22 >
23 > I don't think you're deriving much benefit from Markdown's table syntax
24 > here, if you have to mix it with HTML::Template and ikiwiki directives,
25 > and be pathologically careful with whitespace. "Right tool for the job"
26 > and all that :-) --[[smcv]]