Last modified: 2005-09-29 01:58:30 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.
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 ;)
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>
> 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>)