Fix md_pango renderer which broke lists

This commit is contained in:
Markus Koch 2018-03-24 16:08:23 +01:00
parent 3ba42da401
commit a6a3967940

View File

@ -26,13 +26,13 @@ gchar *md_pango_render(gchar *markup, gint length)
g_free(str);
str = str2;
regex = g_regex_new("\\*{2}([^\\*]*)\\*{2}", 0, 0, NULL);
regex = g_regex_new("\\*{2}([^\\*\n]*)\\*{2}", 0, 0, NULL);
str2 = g_regex_replace(regex, str, -1, 0, "<b>\\1</b>", 0, NULL);
g_regex_unref(regex);
g_free(str);
str = str2;
regex = g_regex_new("\\*([^\\*]*)\\*", 0, 0, NULL);
regex = g_regex_new("\\*([^\\*\n]*)\\*", 0, 0, NULL);
str2 = g_regex_replace(regex, str, -1, 0, "<i>\\1</i>", 0, NULL);
g_free(str);
str = str2;