deayalas / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Failure to identify start of regular expression in <script> body. #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
for best example, see provided link
http://jqueryfordesigners.com/image-cross-fade-transition/

Original issue reported on code.google.com by aleksand...@gmail.com on 28 Mar 2011 at 2:40

GoogleCodeExporter commented 9 years ago
I don't see the line.  Please quote the problematic section?

Original comment by mikesamuel@gmail.com on 29 Mar 2011 at 12:36

GoogleCodeExporter commented 9 years ago
I'm sorry, I didn't realize the page opens on the project start page, not the 
view code page. I made a screenshot and highlighted a few places where the bug 
occures

Original comment by aleksand...@gmail.com on 29 Mar 2011 at 7:58

Attachments:

GoogleCodeExporter commented 9 years ago
Ok.  It looks like the problem has to do with determining whether a / starts a 
regular expression or a division operator.

        var target = $$.css('backgroundImage').replace(/^url[\(\)'"]/g, '');

        // nice long chain: wrap img element in span
        $$.wrap('<span style="position: relative;"></span>')

Original comment by mikesamuel@gmail.com on 29 Mar 2011 at 9:25