[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/misc.c (xs_abort_empty_line): rem
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/misc.c (xs_abort_empty_line): remove the contents key if contents are empty. |
Date: |
Sun, 18 Sep 2022 08:32:52 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new b41f2cf028 * tp/Texinfo/XS/misc.c (xs_abort_empty_line): remove the
contents key if contents are empty.
b41f2cf028 is described below
commit b41f2cf028d930e34f9b8718ef17f4d0aa71cb40
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Sep 18 14:32:41 2022 +0200
* tp/Texinfo/XS/misc.c (xs_abort_empty_line): remove the contents key
if contents are empty.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/misc.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a19535dbe8..e681cedef2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-09-18 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/misc.c (xs_abort_empty_line): remove the contents key
+ if contents are empty.
+
2022-09-18 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_register_command_as_argument)
diff --git a/tp/Texinfo/XS/misc.c b/tp/Texinfo/XS/misc.c
index 27b65f4d67..b1963a8706 100644
--- a/tp/Texinfo/XS/misc.c
+++ b/tp/Texinfo/XS/misc.c
@@ -119,6 +119,8 @@ xs_abort_empty_line (HV *self, HV *current, SV
*additional_spaces_in)
{
/* Remove spaces_elt */
av_pop (contents_array);
+ if (av_len(contents_array) + 1 == 0)
+ hv_delete (current, "contents", strlen ("contents"), G_DISCARD);
}
else if (!strcmp (type, "empty_line"))
{
@@ -186,6 +188,8 @@ delete_type:
/* Remove spaces_elt */
av_pop (contents_array);
+ if (av_len(contents_array) + 1 == 0)
+ hv_delete (current, "contents", strlen ("contents"), G_DISCARD);
/* add spaces to associated element extra "spaces_before_argument" */
svp = hv_fetch (spaces_elt, "extra", strlen ("extra"), 0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/misc.c (xs_abort_empty_line): remove the contents key if contents are empty.,
Patrice Dumas <=