[gtkhtml] Bug 678479 - Leading spaces in first line of <pre> are ignored
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Bug 678479 - Leading spaces in first line of <pre> are ignored
- Date: Wed, 20 Jun 2012 14:33:15 +0000 (UTC)
commit 4fae4725243fe1d83d15c84a1e652217369d4d0d
Author: Kouhei Sutou <kou clear-code com>
Date: Wed Jun 20 10:29:11 2012 -0400
Bug 678479 - Leading spaces in first line of <pre> are ignored
gtkhtml/htmlengine.c | 2 +-
gtkhtml/tests/test12.html | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index 99406c3..4c1bf9f 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -970,7 +970,7 @@ insert_text (HTMLEngine *e,
text++;
text--;
}
- } else if ((e->flow == NULL && !e->editable) || ((prev == NULL || prev_text_ends_in_space) && !e->inPre)) {
+ } else if (!e->inPre && ((e->flow == NULL && !e->editable) || ((prev == NULL || prev_text_ends_in_space) && !e->inPre))) {
while (*text == ' ')
text++;
if (*text == 0)
diff --git a/gtkhtml/tests/test12.html b/gtkhtml/tests/test12.html
new file mode 100644
index 0000000..dac335b
--- /dev/null
+++ b/gtkhtml/tests/test12.html
@@ -0,0 +1,6 @@
+<html>
+<pre>
+ Leading spaces at the first line in pre.
+ Leading spaces at the second line in pre.
+</pre>
+</html>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]