[gnome-notes/wip/igaldino/new-note-title] deserializer: Fix missing 1st line



commit a0c572f3ebc0f88a88f541404329400f1442de7f
Author: Isaque Galdino <igaldino gmail com>
Date:   Sun Jun 9 21:59:17 2019 -0300

    deserializer: Fix missing 1st line

 src/libbiji/deserializer/biji-lazy-deserializer.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/libbiji/deserializer/biji-lazy-deserializer.c 
b/src/libbiji/deserializer/biji-lazy-deserializer.c
index ed981bb..a89685d 100644
--- a/src/libbiji/deserializer/biji-lazy-deserializer.c
+++ b/src/libbiji/deserializer/biji-lazy-deserializer.c
@@ -327,6 +327,8 @@ process_bijiben_start_elem (BijiLazyDeserializer *self)
   if (g_strcmp0 (element_name, "script") == 0)
     is_node_script = TRUE;
 
+  if (g_strcmp0 (element_name, "body") == 0)
+    is_node_script = FALSE;
 
   /* Block level elements introduce a new line, except that blocks
      at the very beginning of their parent don't, and <br/> at the
@@ -364,13 +366,6 @@ process_bijiben_text_elem (BijiLazyDeserializer *self)
 {
   gchar *text;
 
-  /* in case this is js, skip this node */
-  if (is_node_script == TRUE)
-  {
-    is_node_script = FALSE;
-    return;
-  }
-
   text = (gchar *) xmlTextReaderConstValue (self->inner);
 
   if (text)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]