PiRSquared17 / wikiwym

Automatically exported from code.google.com/p/wikiwym
0 stars 0 forks source link

Newline problem MSIE 8 #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. parse a text like "a\n\nb"

What is the expected output? What do you see instead?
Only one newline is detected. It seems the two newlines are collapsed into one. 
The fault is inside String.split(..)

this.lines = text ? text.split(/\r?\n/) : [];

vs.

this.lines = text ? text.replace('\r','').split('\n') : [];

The latter works correctly. There's apparently a difference in using a regular 
expression or a ordinary string.

What version of the product are you using? On what operating system?
MSIE 8 mode (tested with MSIE9 and the compatibility options)

Please provide any additional information below.

Original issue reported on code.google.com by mutewitn...@gmail.com on 21 Jan 2013 at 4:31

GoogleCodeExporter commented 9 years ago
Thank you for the bug report and workaround. i'll get it patched sometime this 
week but cannot test it on Windows (i don't own a copy).

Original comment by sgbeal@googlemail.com on 21 Jan 2013 at 4:49

GoogleCodeExporter commented 9 years ago
i have committed this change in the trunk r237. Please try it out and let me 
know if it works for you. i am not on a system i can test it on right now :/.

Original comment by sgbeal@googlemail.com on 21 Jan 2013 at 5:06

GoogleCodeExporter commented 9 years ago
Changed status to "started" so that i don't forget to merge this into the 
stable branch once it's proven okay.

Original comment by sgbeal@googlemail.com on 21 Jan 2013 at 5:07

GoogleCodeExporter commented 9 years ago
Hi,

Once it's ready I will test it for you, no problem :)

Original comment by mutewitn...@gmail.com on 21 Jan 2013 at 9:45

GoogleCodeExporter commented 9 years ago
Works on MSIE 8 and 9! Thank you :)

Original comment by mutewitn...@gmail.com on 22 Jan 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Thanks for the test. i'll get this merged in to the "stable" branch as soon as 
i can test it out on Linux.

Original comment by sgbeal@googlemail.com on 22 Jan 2013 at 10:38

GoogleCodeExporter commented 9 years ago
Hi! Should work fine on Linux as I initially patched it there :) Greets!

Original comment by mutewitn...@gmail.com on 4 Feb 2013 at 6:12

GoogleCodeExporter commented 9 years ago
Hi! The question now is not so much whether it works on Linux (i am certain it 
will) but whether it breaks any of my wikis which themselves include wikiwym 
directly from Google Code (as opposed to having their own copy) ;). So far i 
haven't had the energy to confirm that. Until i get it merged into the "stable" 
branch, feel free to include the "trunk" copy into your project(s).

Original comment by sgbeal@googlemail.com on 5 Feb 2013 at 9:29