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

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9894|0                           |1
        is obsolete|                            |

--- Comment #4 from [email protected] 2012-01-23 20:56:41 UTC ---
Created attachment 9897
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9897
patch proposal (v2) for Bug 28950 and Bug 29025

New patch proposal for Bug 28950 and Bug 29025.

Now also perfectly manages \n's :-)

Here's my approach: the \n's are captured by the regex, as does the production
code, but no link is created if the spaces between "ISBN" and "123..." met any
of these conditions:
- several \n's (not necessarily consecutive); which forcibly leave the current
<p>
- \n followed by a normal space; which trigger <pre> creation


Also, I removed the following lines I added in my previous patch:
$spaces = preg_replace( '![ \t]+!', ' ', $spaces );
$spaces = preg_replace( '!&\#0?160;|\x{0160}!u', '&nbsp;', $spaces );

I noticed the parser usually doesn't do this cleanup (it only replaces entities
with &#160;), so for consistency and performances I just let the spaces
unmodified.


Please inform me of anything I would have forgotten.

Sumana, you're welcome; I'm keeping it in mind for the next time.

-- 
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