Aresinho / pagedown

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

Getting Uncaught SyntaxError on list creation #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> Markdown.Editor.js:327
> Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'sfsdf 
sdfs dfsdf sdf sf'

How i got it: 
- type a list of words and create a new blank line at last
- select every line (except the blank one). The last non-blank one should be 
hilighted to the end of line — not end of last word in line.
- press Numbered or Bulleted list via shortcut or toolbar button

Since my English is not as well as I want so, attaching a screenshot :)

Original issue reported on code.google.com by byashi...@gmail.com on 9 Feb 2012 at 7:56

Attachments:

GoogleCodeExporter commented 9 years ago
I couldn't reproduce this, but I have a theory. Chrome has always had issues 
with RegExp.$1 (which are a bad and deprecated JavaScript feature anyway), 
which is very likely the issue here.

If my theory is correct, 
http://code.google.com/p/pagedown/source/detail?r=83cdda03fe717ef11812ad4093b7c0
3a9cd6dd80 should fix this. Can you confirm?

Original comment by b...@stackoverflow.com on 9 Feb 2012 at 8:13

GoogleCodeExporter commented 9 years ago
Yes! You've fixed that! Thank you.
Oh, it joins lines to one when I expect a list. I think it's a bit awkward. 
Should I create a new ticket or it's just fine?

Original comment by byashi...@gmail.com on 9 Feb 2012 at 8:28

GoogleCodeExporter commented 9 years ago
Cool!

The line joining thing is consistent with Markdown's handling of newlines 
(essentially, single newlines are equivalent to spaces), so that's correct.

Original comment by b...@stackoverflow.com on 9 Feb 2012 at 8:31