bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

SVG beautifier not entire correct #41

Closed bartbutenaers closed 3 years ago

bartbutenaers commented 4 years ago

After beautifiying a raw SVG string, the closing </svg> is not added on a new line:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none" x="0" y="0" viewBox="0 0 900 710" width="100%" height="100%">
  <circle id="mycircle" cx="182.901" cy="91.4841" style="fill:rosybrown;stroke:black;stroke-width:1px;" r="48" /></svg>
Steve-Mcl commented 4 years ago

Works for me. 2019-10-13_14-38-33

update... ah shoot, its a problem with self closing tags.

Raised and issue on repo... https://github.com/beautify-web/js-beautify/issues/1718

bartbutenaers commented 4 years ago

288 open issues on that library...

Steve-Mcl commented 3 years ago

Not sure if you noticed but https://github.com/beautify-web/js-beautify/issues/1718 is now closed Bart. It doesnt say if the problem was actually fixed mind!

Steve-Mcl commented 3 years ago

Just checked & it is fixed :)

bartbutenaers commented 3 years ago

Hey Steve (@Steve-Mcl ), I had checked it some time ago, but then it was still open. Indeed it seems to be working now, if I reinstall the svg node. Thanks for the update! Bart