1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-08 04:20:09 +00:00

Projucer: Make the source code editor respect line endings when loading and saving a file and add an option to set the preferred line feed for a project

This commit is contained in:
ed 2018-11-27 17:28:36 +00:00
parent 7b09d14695
commit b8a4e00cb4
11 changed files with 96 additions and 56 deletions

View file

@ -433,7 +433,7 @@ namespace CodeHelpers
String getLeadingWhitespace (String line)
{
line = line.removeCharacters ("\r\n");
line = line.removeCharacters (line.endsWith ("\r\n") ? "\r\n" : "\n");
auto endOfLeadingWS = line.getCharPointer().findEndOfWhitespace();
return String (line.getCharPointer(), endOfLeadingWS);
}