Keep original line ending in merge postactions
prupipho opened this issue · 0 comments
prupipho commented
Line ending change during merging post-action with the original file.
Due to this issue in WebTS while working for React Native we realised that in some scenarios we are changing the line ending of the file during the merge.
We should try doing the same thing we do with original Encoding:
- get original file ending
- check the new file has the same ending
- keep that line ending on the new generated file after a post-action
WIP - work in progress:
- Branch: https://github.com/microsoft/CoreTemplateStudio/tree/prupipho-306-eol_change
- Outstanding work before completing:
- review and remove replaces of "\n", "\r\n" by String.Empty as it may be solved with this change to keep original line ending. See MergePostAction_Execute_Success.
- add testing to MergePostAction and AddJsonDictionaryItemPostAction. So we can be confident about lineEnding changes not breaking anything.
- finish script to review and change lineEndings => branch: https://github.com/prupipho/WebTemplateStudio/tree/prupipho-1769-keepOriginalLineEnding