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:
parent
7b09d14695
commit
b8a4e00cb4
11 changed files with 96 additions and 56 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue