typo in script ver 1.6.0.2
Reported by PhotoMan | July 24th, 2008 @ 05:25 PM
The desecente selector on line 2971 shows:
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$~|]?=)\s((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
},
it should be:
attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$~|]?=)\s(([''])([^\4]*?)\4|([^''][^\]]*?)))?\]/},
There are double quotes ( " ) where there needs to be a single ( ' ) quote.
Comments and changes to this ticket
-
John-David Dalton July 24th, 2008 @ 06:19 PM
This text highlighting bug in your text editor.
I believe the code is correct.
If it bothers you, you can add //" at the end of the line.
-
John-David Dalton July 24th, 2008 @ 06:17 PM
- → State changed from new to invalid
-

PhotoMan July 25th, 2008 @ 01:32 AM
- → Assigned user changed from to John-David Dalton
No it's not a highlighting bug -- check the line I posted.
Here is one of the errors:
\s((['"])
^
7th character in is a double quote next to a single quote. (make your text bigger if you need to.)
-

PhotoMan July 25th, 2008 @ 01:39 AM
- no changes were found...
-

-
John-David Dalton July 25th, 2008 @ 01:47 AM
Thanks for taking the time to make a screenshot.
Thats not a real error.
The regular expression is valid, Some text editors
like dreamweaver have problems with advanced regular
expressions and it seems to be effecting your text editor as well.
-

PhotoMan July 25th, 2008 @ 01:50 AM
Oh.. if I change it to a single quote i suppose will it still function?
-
John-David Dalton July 25th, 2008 @ 01:55 AM
By changing it to a single quote you are making expressions like $$('a[class="link"]') invalid because now the double quote wont be matched.
The code is valid the way it is and does not need modifying. If the code highlight bothers you, you may add a comment at the end of the line like
//"
and that should fix the code highlight.
-
Thomas Fuchs July 25th, 2008 @ 02:13 AM
- no changes were found...
-
Thomas Fuchs July 25th, 2008 @ 02:13 AM
for reference, see the attachment of how it looks in textmate, which supports the regexps correctly
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
