1
0
Fork 0

[gmi] Add a new line after the first line of "preformatted" text. Refs #265

(cherry picked from commit e0a125f112)
This commit is contained in:
Witold Filipczyk 2023-09-12 10:23:26 +02:00
parent a5e9bd5bde
commit 11216f4b67
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
preformat = !preformat;
repl = preformat ? &pre_start : &pre_end;
string_replace(&html, &line, &gem_pre, repl);
if (preformat) {
add_char_to_string(&html, '\n');
}
} else if (preformat) {
add_string_to_string(&html, &line);
add_char_to_string(&html, '\n');