Last modified: 2005-09-29 01:58:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5566, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3566 - Italics or Bold don't close properly within a wikilink
Italics or Bold don't close properly within a wikilink
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/HMS_Levi...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-28 16:57 UTC by Daniel U. Thibault
Modified: 2005-09-29 01:58 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel U. Thibault 2005-09-28 16:57:21 UTC
For example, if I write:

<nowiki>
:''See [[SS Great Eastern|SS ''Great Eastern'']] for details.''
</nowiki>

I expect, beside the indent (which is irrelevant --I tested that), the words « See SS » in 
italics and the « Great Eastern » not in italics, then « for details. » in italics again. 
Instead, I get all italics. I had to write instead:

<nowiki>
:''See SS ''[[SS Great Eastern|Great Eastern]]'' for details.''
</nowiki>

The same problem occurs with bolding.
Comment 1 Rowan Collins [IMSoP] 2005-09-29 00:33:43 UTC
Actually, the effect you're after is impossible in "tidy" HTML (and certainly in
valid XML), since it requires elements to overlap, as in:
<i>...<a>...</i>...<i>...</a>...</i>

If you try and picture this as a tree, where the elements contain each other,
you get as far as
i --+
    +-- a --+
            +-- (some text)
and then encounter an instruction to "leave the i branch"; but how can you leave
the i branch without leaving the a one?


If there were a "stop being italic" element, it could become:
i --+
    +-- a --+
            +-- (some text)
            |
            +-- "not italic" --+ 
                               +-- (some text)
            +------------------+
    +-------+
----+
but there's no such element in standard HTML, so it's not surprising MediaWiki
doesn't output it ;)
Comment 2 Brion Vibber 2005-09-29 00:56:56 UTC
Please check the output; if it's creating invalid HTML output THAT IS A BUG IN MEDIAWIKI. 
(Please check both what's created by MediaWiki directly and what tidy ends up with.)

Also, the desired effect does not require invalid HTML; properly nested HTML for the desired 
effect could be:
<i>italic</i><a><i>italic-link</i>plain-link<i>italic-link</i></a><i>italic</i>
Comment 3 Rowan Collins [IMSoP] 2005-09-29 01:58:30 UTC
> Please check the output; if it's creating invalid HTML output THAT IS A BUG IN
MEDIAWIKI. 
> (Please check both what's created by MediaWiki directly and what tidy ends up
with.)

Hm, in that case, I guess it is a bug - without tidy, it seems it does create
the "overlapping" form, so if the aim [or an aim] is to have no situation in
which the output is invalid, something needs changing.
 
> Also, the desired effect does not require invalid HTML; properly nested HTML
for the desired 
> effect could be:
> <i>italic</i><a><i>italic-link</i>plain-link<i>italic-link</i></a><i>italic</i>

Ah yes, I didn't think of that. That would be pretty awkward to generate,
though, wouldn't it - it seems to require rather more "context awareness" than
the current "parser" can achieve. Perhaps the already confusing doQuotes() could
also spot "[[" and "[" somehow? (The rule being that you need to close currently
open <b>s and <i>s and then open the same ones the other side of the <a>)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links