[evolution/449-support-markdown-in-composer] Markdown: Use '*', instead of '_', for italic
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/449-support-markdown-in-composer] Markdown: Use '*', instead of '_', for italic
- Date: Wed, 9 Feb 2022 08:26:29 +0000 (UTC)
commit ea8ace0896338020792a4d5e79723d2e05083ef6
Author: Milan Crha <mcrha redhat com>
Date: Wed Feb 9 09:25:19 2022 +0100
Markdown: Use '*', instead of '_', for italic
The cmark does not catch '_' in the middle of the text, it catches
only the '*'.
src/e-util/e-markdown-editor.c | 2 +-
src/e-util/e-markdown-utils.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/e-util/e-markdown-editor.c b/src/e-util/e-markdown-editor.c
index fdb6a5485b..319b3d2d31 100644
--- a/src/e-util/e-markdown-editor.c
+++ b/src/e-util/e-markdown-editor.c
@@ -742,7 +742,7 @@ e_markdown_editor_format_italic_text_cb (EMarkdownEditor *self)
{
g_return_if_fail (E_IS_MARKDOWN_EDITOR (self));
- e_markdown_editor_surround_selection (self, FALSE, "_", "_");
+ e_markdown_editor_surround_selection (self, FALSE, "*", "*");
}
static void
diff --git a/src/e-util/e-markdown-utils.c b/src/e-util/e-markdown-utils.c
index 3a0a13b3af..b3fc121388 100644
--- a/src/e-util/e-markdown-utils.c
+++ b/src/e-util/e-markdown-utils.c
@@ -220,7 +220,7 @@ markdown_utils_sax_start_element_cb (gpointer ctx,
if (g_ascii_strcasecmp (name, "i") == 0 ||
g_ascii_strcasecmp (name, "em") == 0) {
if (!data->plain_text)
- g_string_append (data->buffer, "_");
+ g_string_append (data->buffer, "*");
return;
}
@@ -395,7 +395,7 @@ markdown_utils_sax_end_element_cb (gpointer ctx,
if (g_ascii_strcasecmp (name, "i") == 0 ||
g_ascii_strcasecmp (name, "em") == 0) {
if (!data->plain_text)
- g_string_append (data->buffer, "_");
+ g_string_append (data->buffer, "*");
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]