Fix ignore_newline regardless of markup
Fix issue where ignore_newline wouldn't work with other markup options. Fixes #293
This commit is contained in:
parent
956f91f6a4
commit
3ef15065a3
@ -245,13 +245,7 @@ char *notification_replace_format(const char *needle, const char *replacement,
|
||||
|
||||
if (markup_mode == MARKUP_NO) {
|
||||
tmp = strdup(replacement);
|
||||
tmp = string_replace_all("\\n", "\n", tmp);
|
||||
if (settings.ignore_newline) {
|
||||
tmp = string_replace_all("\n", " ", tmp);
|
||||
}
|
||||
tmp = notification_quote_markup(tmp);
|
||||
ret = string_replace_all(needle, tmp, haystack);
|
||||
free(tmp);
|
||||
} else {
|
||||
tmp = strdup(replacement);
|
||||
if (settings.ignore_newline) {
|
||||
@ -269,9 +263,15 @@ char *notification_replace_format(const char *needle, const char *replacement,
|
||||
tmp = notification_quote_markup(tmp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tmp = string_replace_all("\\n", "\n", tmp);
|
||||
if (settings.ignore_newline) {
|
||||
tmp = string_replace_all("\n", " ", tmp);
|
||||
}
|
||||
|
||||
ret = string_replace_all(needle, tmp, haystack);
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user