Closed
Bug 348656
Opened 19 years ago
Closed 19 years ago
"Error: invalid quantifier" with microsummary generator installed
Categories
(Firefox Graveyard :: Microsummaries, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: ispiked, Unassigned)
Details
Attachments
(1 file)
|
517 bytes,
application/xml
|
Details |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1b1) Gecko/20060814 BonEcho/2.0b1
I think this error is coming from my test-3.html microsummary generator. I have the generator in the microsummary-generators/ folder, but I don't have any bookmarks that use the microsummary.
http://people.mozilla.com/~aguthrie/testcases/microsummaries/test-3-generator.xml
The error is:
Error: invalid quantifier *.\/test-3\.html
Source File: file:///Applications/BonEcho.app/Contents/MacOS/components/nsMicrosummaryService.js
Line: 1165
The line is: |var urlRegexp = node.textContent.replace(/^\s+|\s+$/g, "");|.
See also bug 330796.
| Reporter | ||
Comment 1•19 years ago
|
||
Now that I look at it, the generator I linked to in comment 0 is not the one that's causing the errors. Here is the one (from my profile folder) that's the culprit.
| Reporter | ||
Updated•19 years ago
|
Attachment #233635 -
Attachment mime type: text/plain → application/xml
Comment 2•19 years ago
|
||
The line that actually generates the error is the next one:
this._rules.push({ type: node.nodeName, regexp: new RegExp(urlRegexp) });
You can reproduce by typing the following into the error console:
new RegExp("*.\/test-3\.html")
JavaScript is correctly reporting an invalid quantifier (although it reports it poorly per bug 330796), as the quantifier "*" appears in the regular expression before any character it might quantify. I think you meant to write ".*" (period first) instead of "*." (asterisk first).
Marking this bug invalid, as this result is intentional, but perhaps we should do something other than fail to load the generator if one of its regular expressions is invalid (but that could get tricky given that the expressions are part of a cascade that determines the applicable pages; they don't make perfect sense independently of each other).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•10 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•