Skip to content

Commit

Permalink
fix(regexp): remove useless-escape
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanGerbeth committed Aug 24, 2018
1 parent 8c0fbae commit fd0caa0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function highlightCode(code, lang = '') {
}

function modifySVG(svg) {
return svg.replace(/viewBox=\"([0-9\.]+), ([0-9\.]+), ([0-9\.]+), ([0-9\.]+)\"/, (match, g1, g2, g3, g4) => {
return svg.replace(/viewBox="([0-9.]+), ([0-9.]+), ([0-9.]+), ([0-9.]+)"/, (match, g1, g2, g3, g4) => {
return `height="${g4}" preserveAspectRatio="xMinYMax slice" viewBox="${g1}, ${g2}, 898, ${g4}"`;
}).replace(/(\<rect x=\"0\" y=\"0\" width=\")([0-9\.]+)(\")/, (match, g1, g2, g3) => {
}).replace(/(<rect x="0" y="0" width=")([0-9.]+)(")/, (match, g1, g2, g3) => {
return [g1, 898, g3].join('');
});
}
Expand Down

0 comments on commit fd0caa0

Please sign in to comment.