mirror of
git://projects.qi-hardware.com/antorcha.git
synced 2024-11-22 12:06:16 +02:00
tools/libtxt/edit.c (text2edit): correct handling of newlines
This commit is contained in:
parent
3faf58c601
commit
60e9a1e919
@ -181,8 +181,8 @@ struct edit *text2edit(const char *s)
|
||||
if (s != start) {
|
||||
add_string(&last, start, s-start);
|
||||
have_text = 1;
|
||||
start = s+1;
|
||||
}
|
||||
start = s+1;
|
||||
|
||||
if (*s == '\n' && !have_text)
|
||||
continue;
|
||||
@ -195,8 +195,10 @@ struct edit *text2edit(const char *s)
|
||||
*last = e;
|
||||
last = &e->next;
|
||||
|
||||
if (*s == '\n')
|
||||
if (*s == '\n') {
|
||||
have_text = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
end = strchr(s, '>');
|
||||
if (!end)
|
||||
|
Loading…
Reference in New Issue
Block a user