diff --git a/components/ConversionPanel.tsx b/components/ConversionPanel.tsx index 1e3e358..fa38a73 100644 --- a/components/ConversionPanel.tsx +++ b/components/ConversionPanel.tsx @@ -95,10 +95,15 @@ const ConversionPanel: React.FunctionComponent = function( splitEditorValue: splitTitle ? splitValue : undefined }); - const prettyResult = await prettierWorker.send({ + let prettyResult = await prettierWorker.send({ value: result, language: resultLanguage }); + + // Fix for #319 + if (prettyResult.startsWith(";<")) { + prettyResult = prettyResult.slice(1); + } setResult(prettyResult); setMessage(""); } catch (e) { diff --git a/package.json b/package.json index 67d333f..1927136 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:analyze": "ANALYZE=true yarn build" }, "engines": { - "node": "12.x" + "node": "14.x" }, "dependencies": { "@babel/plugin-transform-flow-strip-types": "^7.16.0", diff --git a/patches/htmltojsx+0.3.0.patch b/patches/htmltojsx+0.3.0.patch index f0f2cef..ac2f01c 100644 --- a/patches/htmltojsx+0.3.0.patch +++ b/patches/htmltojsx+0.3.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/htmltojsx/src/htmltojsx.js b/node_modules/htmltojsx/src/htmltojsx.js -index afe4c85..b326beb 100644 +index afe4c85..960e450 100644 --- a/node_modules/htmltojsx/src/htmltojsx.js +++ b/node_modules/htmltojsx/src/htmltojsx.js @@ -326,19 +326,9 @@ HTMLtoJSX.prototype = { @@ -44,3 +44,12 @@ index afe4c85..b326beb 100644 return this.output; }, +@@ -627,6 +618,8 @@ HTMLtoJSX.prototype = { + result += '={' + attribute.value + '}'; + } else if (attribute.value.length > 0) { + result += '="' + attribute.value.replace(/"/gm, '"') + '"'; ++ } else { ++ result += '=""'; + } + return result; + } diff --git a/patches/json_typegen_wasm+0.6.1.patch b/patches/json_typegen_wasm+0.7.0.patch similarity index 100% rename from patches/json_typegen_wasm+0.6.1.patch rename to patches/json_typegen_wasm+0.7.0.patch