Skip to content

Commit

Permalink
Closes: svg#1133
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilaria Venturini committed Jul 24, 2019
1 parent 10a302f commit 2236503
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/prefixIds.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ exports.fn = function(node, opts, extra) {
if(prefix === false){
return escapeIdentifierName(name);
}
if (name.startsWith(escapeIdentifierName(prefix) + opts.delim)) {
// Already prefixed!
return escapeIdentifierName(name);
}
return escapeIdentifierName(prefix + opts.delim + name);
};

Expand Down

0 comments on commit 2236503

Please sign in to comment.