Closed pprev94 closed 2 years ago
Hey @pprev94. Thanks for the report.
Would be cool if we could keep this in sync with the SLD-Parser: https://github.com/geostyler/geostyler-sld-parser/blob/master/src/SldStyleParser.ts#L1303
We have an prettyOutput
option over there. Could you check if this would fix it for you?
I've the same errors in SLD parser too prettyOutput is not enough, we need to define newline characters to '\r\n' for windows
Ohh ok. Maybe there is a way to fix this issue within the testsuite instead of a change to the parser. I don't know when i'll find time to have a closer look at this.
May I suggest to remove the character '\r'
const qml = fs.readFileSync('./data/qmls/no_symbolizer.qml', 'utf8').replace(/\r/g, "")
Now tests run correctly
I'll have a look at this later.
What surprises me is that the linebreak when reading the file can be different. I thought this information would be stored in the file.
Lineending should be LF (\n
) for all qml files.
:thinking:
Lineending should be LF (
\n
) for all qml files.
If this is not the case for you @pprev94 . We may need to add a .gitattributes
file to force LF (\n
) when checking out:
On Windows :
To fix it, I suggest in function writeStyle of QGISStyleParser class
Is there a better way to do it ?