diff --git a/gb.gtk/src/gtools.cpp b/gb.gtk/src/gtools.cpp index d3bc94448..7373b6931 100644 --- a/gb.gtk/src/gtools.cpp +++ b/gb.gtk/src/gtools.cpp @@ -1053,7 +1053,7 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b { if ((end_token || inside_par) && p[1]) { - g_string_append(pango, "\n\n"); + g_string_append(pango, "\n"); newline = true; } inside_par = start_token; @@ -1135,6 +1135,15 @@ char *gt_html_to_pango_string(const char *html, int len_html, bool newline_are_b goto __FOUND_TOKEN; } + if (!strcasecmp(token, "code")) + { + if (start_token && !end_token) + g_string_append(pango, ""); + else if (end_token && !start_token) + g_string_append(pango, ""); + goto __FOUND_TOKEN; + } + g_string_append(pango, "<"); if (end_token) g_string_append(pango, "/"); while (p_markup < p)