Make sure that a note record tag with an empty value is removed.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 25 Jan 2003 19:22:00 +0000 (19:22 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sat, 25 Jan 2003 19:22:00 +0000 (19:22 +0000)
gedcom/gedcom.y

index f03280f8ac1e133b75be1e093cb894f3833cbbae..f853e7d3b85c4160662bb898047c3e7ecf97bce4 100644 (file)
@@ -2285,7 +2285,14 @@ cont_sect : OPEN DELIM TAG_CONT mand_line_item
             { $<ctxt>$ = start_element(ELT_SUB_CONT,
                                       PARENT, $1, $3, $4, 
                                       GEDCOM_MAKE_STRING(val1, $4));
-             SAFE_BUF_ADDCHAR(&concat_buffer, '\n');
+             if (compat_mode(C_NOTE_NO_VALUE)) {
+               char* str = get_buf_string(&concat_buffer);
+               if (str[0] != '\0')
+                 SAFE_BUF_ADDCHAR(&concat_buffer, '\n');
+             }
+             else {
+               SAFE_BUF_ADDCHAR(&concat_buffer, '\n');
+             }
              safe_buf_append(&concat_buffer, $4);
              START(CONT, $1, $<ctxt>$)  
             }