Skip to content

Commit

Permalink
refactor: Avoid escaping quote-characters
Browse files Browse the repository at this point in the history
Co-authored-by: AndersCan <[email protected]>
  • Loading branch information
skjalgepalg and AndersCan authored Jun 30, 2022
1 parent e7fa8f0 commit 9bfa658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function parseSVGTagPresentationAttributes (markup) {

for (let match; (match = attributeParsingPattern.exec(attributes));) {
const { 1: key, 2: val } = match
const isQuoted = val && (val[0] === '\'' || val[0] === '"')
const isQuoted = val && (val[0] === `'` || val[0] === `"`)
if (SVG_PRESENTATION_ATTRIBUTES.indexOf(key.toLowerCase()) > -1) {
attrs[key.toLowerCase()] = isQuoted ? val.slice(1, val.length - 1) : val
}
Expand Down

0 comments on commit 9bfa658

Please sign in to comment.