8000 ttconv: Also replace carriage return with spaces. · matplotlib/matplotlib@d49faf8 · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit d49faf8

Browse files
committed
ttconv: Also replace carriage return with spaces.
Multi-line strings will cause issues in comments since the secondary lines will not be comments. This replacement is already done for newline characters (\n), but not carriage return (\r) which is prevalent on Windows.
1 parent 75a35ef commit d49faf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extern/ttconv/ttutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void TTStreamWriter::putline(const char *a)
7676
void replace_newlines_with_spaces(char *a) {
7777
char* i = a;
7878
while (*i != 0) {
79-
if (*i == '\n')
79+
if (*i == '\r' || *i == '\n')
8080
*i = ' ';
8181
i++;
8282
}

0 commit comments

Comments
 (0)
0