[evolution/wip/webkit2] EHTMLEditorView - Quote symbols could be inserted twice around tabulator
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Quote symbols could be inserted twice around tabulator
- Date: Wed, 2 Mar 2016 14:39:38 +0000 (UTC)
commit 50864a0370e6379ab1eb28d80b3abc74884ae55e
Author: Tomas Popela <tpopela redhat com>
Date: Wed Mar 2 14:50:28 2016 +0100
EHTMLEditorView - Quote symbols could be inserted twice around tabulator
.../composer/e-html-editor-view-dom-functions.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.c
b/web-extensions/composer/e-html-editor-view-dom-functions.c
index d84955b..36867a4 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.c
@@ -3402,7 +3402,8 @@ quote_node (WebKitDOMDocument *document,
WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (prev_sibling) ||
element_has_tag (WEBKIT_DOM_ELEMENT (prev_sibling), "b") ||
element_has_tag (WEBKIT_DOM_ELEMENT (prev_sibling), "i") ||
- element_has_tag (WEBKIT_DOM_ELEMENT (prev_sibling), "u"));
+ element_has_tag (WEBKIT_DOM_ELEMENT (prev_sibling), "u") ||
+ element_has_class (WEBKIT_DOM_ELEMENT (prev_sibling), "Apple-tab-span"));
if (prev_sibling && is_html_node)
skip_first = TRUE;
@@ -3593,7 +3594,8 @@ quote_plain_text_recursive (WebKitDOMDocument *document,
WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (node) ||
element_has_tag (WEBKIT_DOM_ELEMENT (node), "b") ||
element_has_tag (WEBKIT_DOM_ELEMENT (node), "i") ||
- element_has_tag (WEBKIT_DOM_ELEMENT (node), "u");
+ element_has_tag (WEBKIT_DOM_ELEMENT (node), "u") ||
+ element_has_class (WEBKIT_DOM_ELEMENT (node), "Apple-tab-span");
if (is_html_node) {
gboolean wrap_br;
@@ -3604,9 +3606,12 @@ quote_plain_text_recursive (WebKitDOMDocument *document,
element_has_class (
WEBKIT_DOM_ELEMENT (prev_sibling), "-x-evo-wrap-br");
- if (!prev_sibling || wrap_br)
+ if (!prev_sibling || wrap_br) {
insert_quote_symbols_before_node (
document, node, quote_level, FALSE);
+ if (!prev_sibling && next_sibling && WEBKIT_DOM_IS_TEXT (next_sibling))
+ suppress_next = TRUE;
+ }
if (WEBKIT_DOM_IS_HTML_BR_ELEMENT (prev_sibling) && !wrap_br)
insert_quote_symbols_before_node (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]