Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clenaer PR for regex in parser #2311

Merged
merged 3 commits into from
Jun 26, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update parser.js
asturur committed Jun 26, 2015
commit 2315fafde15f0cf1d56cfdc8c683f40f60250215
2 changes: 1 addition & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
@@ -761,7 +761,7 @@
svgUid = element.getAttribute('svgUid');
}
// if there's a parent container (`g` or `a` or `symbol` node), parse its attributes recursively upwards
if (element.parentNode && /^symbol|[g|a]$/i.test(element.parentNode.nodeName)) {
if (element.parentNode && /^(symbol|g|a)$/i.test(element.parentNode.nodeName)) {
parentAttributes = fabric.parseAttributes(element.parentNode, attributes, svgUid);
}
fontSize = (parentAttributes && parentAttributes.fontSize ) ||