From b0ee90a6942b997f5e14e576e4d7840f860090ae Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 7 Apr 2021 16:23:10 -0400 Subject: [PATCH] Move scratch render fonts to peer dependencies since gui will supply it --- package.json | 7 ++++--- src/containers/paper-canvas.jsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1774af93..4ce1d266 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,7 @@ "lodash.omit": "4.5.0", "minilog": "3.1.0", "parse-color": "1.0.0", - "prop-types": "^15.5.10", - "scratch-render-fonts": "latest" + "prop-types": "^15.5.10" }, "peerDependencies": { "react": "^16", @@ -44,7 +43,8 @@ "react-responsive": "^4", "react-style-proptype": "^3", "react-tooltip": "^3", - "redux": "^3" + "redux": "^3", + "scratch-render-fonts": "^1.0.0-prerelease.20210401210003" }, "devDependencies": { "autoprefixer": "9.7.4", @@ -92,6 +92,7 @@ "regenerator-runtime": "^0.13.3", "rimraf": "^2.6.1", "scratch-l10n": "3.11.20210308031514", + "scratch-render-fonts": "^1.0.0-prerelease.20210401210003", "style-loader": "^1.0.0", "svg-url-loader": "^3.0.0", "tap": "^14.4.3", diff --git a/src/containers/paper-canvas.jsx b/src/containers/paper-canvas.jsx index 2f9de52f..b28b40b9 100644 --- a/src/containers/paper-canvas.jsx +++ b/src/containers/paper-canvas.jsx @@ -197,6 +197,7 @@ class PaperCanvas extends React.Component { const paperCanvas = this; // Pre-process SVG to prevent parsing errors (discussion from #213) // 1. Remove svg: namespace on elements. + // TODO: remove svg = svg.split(/<\s*svg:/).join('<'); svg = svg.split(/<\/\s*svg:/).join('