Following from the discussion in #122, would be better if we were able to replace direct string manipulation with XML (SVG) aware libraries, such as cheerio. This would make the code more reliable in the long term.
Example of direct string manipulation:
fileContent = fileContent.slice( 0, -6 ) +
'<rect x="0" style="fill:none;" width="24" height="24"/>' +
fileContent.slice( -6 );
Following from the discussion in #122, would be better if we were able to replace direct string manipulation with XML (SVG) aware libraries, such as cheerio. This would make the code more reliable in the long term.
Example of direct string manipulation: