]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Inlining_adds_newlines_which_can_break_markdown.mdwn
(no commit message)
[ikiwiki.git] / doc / bugs / Inlining_adds_newlines_which_can_break_markdown.mdwn
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     | \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=taglist]] |
4
5 but there's a line in `inline.pm` that does:
6
7     return "<div class=\"inline\" id=\"$#inline\"></div>\n\n";
8
9 And the extra newlines break the table.  Can they be safely removed?
10
11 > If you want an HTML table, I would suggest using an HTML table, which
12 > should pass through Markdown without being interpreted further. To
13 > avoid getting the `<div>` inside the `<table>` you can use:
14 >
15 >     \[[!inline pages="link(/category/env)" feeds=no archive=yes sort=title template=tagtable]]
16 >
17 > where tagtable.tmpl looks like
18 >
19 >     <TMPL_IF FIRST>
20 >     <table><tr>
21 >     </TMPL_IF>
22 >
23 >     <td>your tag here</td>
24 >
25 >     <TMPL_IF LAST>
26 >     </tr></table>
27 >     </TMPL_IF>
28 >
29 > I don't think you're deriving much benefit from Markdown's table syntax
30 > if you have to mix it with HTML::Template and ikiwiki directives,
31 > and be pathologically careful with whitespace. "Right tool for the job"
32 > and all that :-)
33 >
34 > When I edited this page I was amused to find that you used HTML,
35 > not Markdown, as its format. It seems oddly appropriate to my answer, but
36 > I've converted it to Markdown and adjusted the formatting, for easier
37 > commenting.
38 > --[[smcv]]