@solidpepper/solidpepper-solidgeneration 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6941,6 +6941,9 @@ class DataSheetSVG {
6941
6941
  svg = svg.replace(/ /g, ' ');
6942
6942
  svg = svg.replace(/<br\b[^>]*>/gi, '<br>');
6943
6943
  svg = svg.replace(/<br\s*\/?>(?!\s*<\/br>)/gi, '<br />');
6944
+ // Clean malformed closing tags (e.g. </font ...>, </span ...>)
6945
+ svg = svg.replace(/<\/\s*([a-zA-Z0-9_:-]+)(?:\s+[^>]*|\s*\/+)\s*>/gi, '</$1>');
6946
+ svg = svg.replace(/<\/\s+([a-zA-Z0-9_:-]+)\s*>/gi, '</$1>');
6944
6947
  svg = svg.replace(/<[^>]+>/g, (tag) => {
6945
6948
  if (/^<\//.test(tag))
6946
6949
  return tag;