fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
1 lines • 683 B
Source Map (JSON)
{"version":3,"file":"cleanupSvgAttribute.mjs","names":[],"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"],"mappings":";;;AAGA,MAAM,QAAQ,IAAI,OAAO,IAAI,MAAM,IAAI,KAAK;AAE5C,MAAa,uBAAuB,mBAClC,YACE,eACG,QAAQ,OAAO,OAAO,CAEtB,QAAQ,OAAO,IAAI,CACvB"}