Skip to content

Commit 917f78d

Browse files
authored
Merge pull request #779 from tneotia/bugfix/hover-selector-unimplemented
Ignore unsupported style selectors
2 parents f3d2635 + dcb9bd2 commit 917f78d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/html_parser.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ class HtmlParser extends StatelessWidget {
245245

246246
static StyledElement _applyExternalCss(Map<String, Map<String, List<css.Expression>>> declarations, StyledElement tree) {
247247
declarations.forEach((key, style) {
248-
if (tree.matchesSelector(key)) {
249-
tree.style = tree.style.merge(declarationsToStyle(style));
250-
}
248+
try {
249+
if (tree.matchesSelector(key)) {
250+
tree.style = tree.style.merge(declarationsToStyle(style));
251+
}
252+
} catch (_) {}
251253
});
252254

253255
tree.children.forEach((e) => _applyExternalCss(declarations, e));

0 commit comments

Comments
 (0)