Closed NathanHuisman closed 10 months ago
Props replacement wasn't working because the lookbehind only included the symbol '.', which doesn't match newlines.
According to the XML spec, newlines can be included in the spacing in a starttag.
This was a very quick fix, so I figured I did not need to create an issue
Input:
<svg width="35" height="44" viewBox="0 0 35 44" fill="currentColor" xmlns="http://www.w3.org/2000/svg" role="presentation" > <!-- (left out, irrelevant) --> </svg>
Output before fix:
export default (props = {}) => <svg width="35" height="44" viewBox="0 0 35 44" fill="currentColor" xmlns="http://www.w3.org/2000/svg" role="presentation" > {/* (left out, irrelevant) */} </svg>
Output after fix:
export default (props = {}) => <svg width="35" height="44" viewBox="0 0 35 44" fill="currentColor" xmlns="http://www.w3.org/2000/svg" role="presentation" {...props}> {/* (left out, irrelevant) */} </svg>
Description
Props replacement wasn't working because the lookbehind only included the symbol '.', which doesn't match newlines.
According to the XML spec, newlines can be included in the spacing in a starttag.
This was a very quick fix, so I figured I did not need to create an issue
Input:
Output before fix:
Output after fix: