fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
1 lines • 748 B
Source Map (JSON)
{"version":3,"file":"cleanupSvgAttribute.min.mjs","sources":["../../../../src/util/internals/cleanupSvgAttribute.ts"],"sourcesContent":["import { reNum } from '../../parser/constants';\nimport { normalizeWs } from './normalizeWhiteSpace';\n\nconst regex = new RegExp(`(${reNum})`, 'gi');\n\nexport const cleanupSvgAttribute = (attributeValue: string) =>\n normalizeWs(\n attributeValue\n .replace(regex, ' $1 ')\n // replace annoying commas and arbitrary whitespace with single spaces\n .replace(/,/gi, ' '),\n );\n"],"names":["regex","RegExp","reNum","cleanupSvgAttribute","attributeValue","normalizeWs","replace"],"mappings":"mHAGA,MAAMA,EAAQ,IAAIC,OAAO,IAAIC,KAAU,MAE1BC,EAAuBC,GAClCC,EACED,EACGE,QAAQN,EAAO,QAEfM,QAAQ,MAAO"}