]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/Spurious___60__p__62___elements_added_to_tags_in_inliine_pages.mdwn
I would recommend using HTML here
[ikiwiki.git] / doc / bugs / Spurious___60__p__62___elements_added_to_tags_in_inliine_pages.mdwn
1 [[!tag patch]]
2
3 When a page containing tags and using the [[syntax_(3rd_party)_plugin|plugins/contrib/syntax]] (though pages using other preprocessors may also be affected) is rendered as an inline page, some extra `<p>` elements are added.
4
5 Example output:
6
7     <p><span class="tags">
8     Tags:</p>
9     
10     <p><span class="selflink">XML</span></p>
11     
12     <p></span></p>
13
14 Expected output:
15
16     <p><span class="tags">
17     Tags:
18     
19     <span class="selflink">XML</span>
20     </span></p>
21
22 A fix is to change inlinepage.tmpl to remove new lines around tag links, as follows:
23
24     --- templates/inlinepage.tmpl   (revision 4626)
25     +++ templates/inlinepage.tmpl   (working copy)
26     @@ -24,9 +24,7 @@
27      <TMPL_IF NAME="TAGS">
28      <span class="tags">
29      Tags:
30     -<TMPL_LOOP NAME="TAGS">
31     -<TMPL_VAR NAME=LINK>
32     -</TMPL_LOOP>
33     +<TMPL_LOOP NAME="TAGS"> <TMPL_VAR NAME=LINK></TMPL_LOOP>
34      </span>
35      </TMPL_IF>
36
37 > I'm sure this is only working around a symptom, the problem must be that
38 > markdown gets confused by the html generated by the syntax plugin.
39 > Have you tried markdown 1.0.2? This version has a more robust html
40 > parser.
41
42 > I don't have the prerequisites for the syntax plugin installed here
43 > to debug it myself. --[[Joey]]
44
45 > I don't think that this is specific to the [[syntax_(3rd_party)_plugin|plugins/contrib/syntax]].
46 > It's happening on my pages that just use ordinary templates.
47 > I've documented my versions below. --[[daveloyall]]
48 >
49 >     ikiwiki: 3.20140125
50 >     libtext-markdown-discount-perl: 0.11-1
51 >     libtext-multimarkdown-perl: 1.000034-1
52 >     libhtml-template-perl: 2.95-1
53
54 >> Can you show us the source code and output for a page that has this
55 >> bug?
56 >>
57 >> If you enable [[plugins/htmlbalance]], does the problem go away?
58 >> (If it does, then I think I might know what the bug is.)
59 >> --[[smcv]]