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





--- Comment #6 from [EMAIL PROTECTED]  2008-11-29 14:26:29 UTC ---
I missed the common cases ''« text »'' vs »''text''«, and <ref/>s seem to
be already expanded at that stage (by looking at the code; I have no MediaWiki
installation to test):

  s/((?:[\s(]|<[a-zA-Z]+>|^)«) /$1&nbsp;/
  s/ »(?=\.?\)|[.,]?(?:\s|<(?:\/|sup[\s>])|$))/&nbsp;»/

This handles also <blockquote>« citation »</blockquote> and similar (a line
break isn't likely to occur at the beginning of a block element, but it makes a
difference if text-align:justify (in Unicode compliant browsers)). It doesn't
handle start tags with attributes like <span style="...">« text »</span>
because that would be very expensive if done properly.

The better solution would be a configuration switch to apply these
substitutions only for languages where they make sense. The only one of the
current substitutions that makes some sense in most languages is s/ %/&nbsp;%/
(but it still destroys <code>x = y % z</code>).


-- 
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 watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to