projects
/
catagits/HTML-Zoom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Catch unmatched "[" in selector parser with a helpful error
[catagits/HTML-Zoom.git]
/
lib
/
HTML
/
Zoom
/
SelectorParser.pm
diff --git
a/lib/HTML/Zoom/SelectorParser.pm
b/lib/HTML/Zoom/SelectorParser.pm
index
d3a505a
..
9bc7bc3
100644
(file)
--- a/
lib/HTML/Zoom/SelectorParser.pm
+++ b/
lib/HTML/Zoom/SelectorParser.pm
@@
-99,7
+99,12
@@
sub _raw_parse_simple_selector {
sub {
exists $_[0]->{attrs}{$attribute};
}
- }
+ };
+
+ # none of the above matched, try catching some obvious errors:
+
+ # indicate unmatched square bracket:
+ /\G\[[^\]]*/gc and $_[0]->_blam('Unmatched [');
}
}