https://bugzilla.wikimedia.org/show_bug.cgi?id=13073

Brad Jorsch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected].
                   |                            |edu
             Blocks|                            |2542

--- Comment #4 from Brad Jorsch <[email protected]> 2011-11-09 
22:00:59 UTC ---
This has little to do with Cite; it's mainly a Tidy issue.

Consider the following test case:
    <ref>
    foo
    </ref>
    <ref>
    bar
    </ref>
    <div><references/></div>

As far as Cite is concerned, it outputs wikitext something like this for the
<references/> tag:

    <ol><li id="cite_note-0">[[#cite_ref-0|↑]]
    foo
    </li>
    <li id="cite_note-1">[[#cite_ref-1|↑]]
    bar
    </li></ol>

The page output handed to the parser is therefore something like this:

    <div><ol><li id="cite_note-0">[[#cite_ref-0|↑]]
    foo
    </li>
    <li id="cite_note-1">[[#cite_ref-1|↑]]
    bar
    </li></ol></div>

When Tidy sees the <div> on the same line as the <li>, it decides it has to
wrap the rest of the lines in that <li> with <p> tags, which causes the odd
output noted in this bug.

We ''could'' work around this in Cite by outputting newlines around the
contents of the references list. Then the parser would see something like this:

    <div><ol>
    <li id="cite_note-0">[[#cite_ref-0|↑]]
    foo
    </li>
    <li id="cite_note-1">[[#cite_ref-1|↑]]
    bar
    </li>
    </ol></div>

Since the <div> on not on the same line as the <li> anymore, Tidy won't insert
the problematic <p> tags.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to