[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Texinfo.pm (convert_to_texin
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo) (_expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/convert.c (expand_cmd_args_to_texi, convert_to_texinfo_internal), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): consider spaces_before_argument (and spaces_after_argument) only in convert_to_texinfo_internal/convert_to_texinfo. Call convert_contents_to_texinfo instead of convert_to_texinfo to avoid spaces appearing in messages. |
Date: |
Sat, 25 Mar 2023 18:43:04 -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 2c21a5f313 * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo)
(_expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/convert.c
(expand_cmd_args_to_texi, convert_to_texinfo_internal),
tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): consider
spaces_before_argument (and spaces_after_argument) only in
convert_to_texinfo_internal/convert_to_texinfo. Call
convert_contents_to_texinfo instead of convert_to_texinfo to avoid spaces
appearing in messages.
2c21a5f313 is described below
commit 2c21a5f31323fda0c69da6a52bbb388c7300d841
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Mar 25 23:28:32 2023 +0100
* tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo)
(_expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/convert.c
(expand_cmd_args_to_texi, convert_to_texinfo_internal),
tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): consider
spaces_before_argument (and spaces_after_argument) only in
convert_to_texinfo_internal/convert_to_texinfo. Call
convert_contents_to_texinfo instead of convert_to_texinfo to avoid
spaces appearing in messages.
---
ChangeLog | 11 +++++++++++
tp/Texinfo/Convert/Texinfo.pm | 14 ++++++--------
tp/Texinfo/XS/parsetexi/convert.c | 12 +++---------
tp/Texinfo/XS/parsetexi/separator.c | 4 ++--
4 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0b60c6118d..52bd254943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-03-25 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo)
+ (_expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/convert.c
+ (expand_cmd_args_to_texi, convert_to_texinfo_internal),
+ tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): consider
+ spaces_before_argument (and spaces_after_argument) only in
+ convert_to_texinfo_internal/convert_to_texinfo. Call
+ convert_contents_to_texinfo instead of convert_to_texinfo to avoid
+ spaces appearing in messages.
+
2023-03-25 Gavin Smith <gavinsmith0123@gmail.com>
* doc/texinfo.texi (Image Scaling, Predefined Indices):
diff --git a/tp/Texinfo/Convert/Texinfo.pm b/tp/Texinfo/Convert/Texinfo.pm
index 9ab8c463fe..dcc2b619bd 100644
--- a/tp/Texinfo/Convert/Texinfo.pm
+++ b/tp/Texinfo/Convert/Texinfo.pm
@@ -128,13 +128,14 @@ sub convert_to_texinfo($)
if ($element->{'cmdname'}
or ($element->{'type'} and $element->{'type'} eq 'def_line')) {
$result .= _expand_cmd_args_to_texi($element);
- }
- if ($element->{'type'}
- and $element->{'type'} eq 'bracketed_arg') {
- $result .= '{';
+ } else {
+ if ($element->{'type'}
+ and $element->{'type'} eq 'bracketed_arg') {
+ $result .= '{';
+ }
if ($element->{'info'}
and $element->{'info'}->{'spaces_before_argument'}) {
- $result .= $element->{'info'}->{'spaces_before_argument'}->{'text'};
+ $result .= $element->{'info'}->{'spaces_before_argument'}->{'text'};
}
}
if (defined($element->{'contents'})) {
@@ -207,9 +208,6 @@ sub _expand_cmd_args_to_texi($) {
$result .= ',' if ($arg_nr);
$arg_nr++;
}
- if ($arg->{'info'} and $arg->{'info'}->{'spaces_before_argument'}) {
- $result .= $arg->{'info'}->{'spaces_before_argument'}->{'text'};
- }
$result .= convert_to_texinfo($arg);
}
if ($cmdname eq 'verb') {
diff --git a/tp/Texinfo/XS/parsetexi/convert.c
b/tp/Texinfo/XS/parsetexi/convert.c
index b720c27fb8..0c7a4b91b6 100644
--- a/tp/Texinfo/XS/parsetexi/convert.c
+++ b/tp/Texinfo/XS/parsetexi/convert.c
@@ -131,13 +131,7 @@ expand_cmd_args_to_texi (ELEMENT *e, TEXT *result)
ADD(",");
arg_nr++;
}
- k = lookup_info (arg, "spaces_before_argument");
- if (k)
- ADD((char *)k->value->text.text);
convert_to_texinfo_internal (arg, result);
- k = lookup_info (arg, "spaces_after_argument");
- if (k)
- ADD((char *)k->value->text.text);
}
if (e->cmd == CM_verb)
@@ -179,10 +173,10 @@ convert_to_texinfo_internal (ELEMENT *e, TEXT *result)
{
KEY_PAIR *k;
ADD("{");
- k = lookup_info (e, "spaces_before_argument");
- if (k)
- ADD((char *)k->value->text.text);
}
+ k = lookup_info (e, "spaces_before_argument");
+ if (k)
+ ADD((char *)k->value->text.text);
if (e->contents.number > 0)
{
int i;
diff --git a/tp/Texinfo/XS/parsetexi/separator.c
b/tp/Texinfo/XS/parsetexi/separator.c
index 94b278deba..7fee7e5083 100644
--- a/tp/Texinfo/XS/parsetexi/separator.c
+++ b/tp/Texinfo/XS/parsetexi/separator.c
@@ -361,7 +361,7 @@ handle_close_brace (ELEMENT *current, char **line_inout)
{
char *texi = 0;
if (ref->args.list[1])
- texi = convert_to_texinfo (ref->args.list[1]);
+ texi = convert_contents_to_texinfo (ref->args.list[1]);
line_warn ("in @%s empty cross reference name "
"after expansion `%s'",
@@ -379,7 +379,7 @@ handle_close_brace (ELEMENT *current, char **line_inout)
{
char *texi = 0;
if (ref->args.list[2])
- texi = convert_to_texinfo (ref->args.list[2]);
+ texi = convert_contents_to_texinfo (ref->args.list[2]);
line_warn ("in @%s empty cross reference title "
"after expansion `%s'",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Texinfo.pm (convert_to_texinfo) (_expand_cmd_args_to_texi), tp/Texinfo/XS/parsetexi/convert.c (expand_cmd_args_to_texi, convert_to_texinfo_internal), tp/Texinfo/XS/parsetexi/separator.c (handle_close_brace): consider spaces_before_argument (and spaces_after_argument) only in convert_to_texinfo_internal/convert_to_texinfo. Call convert_contents_to_texinfo instead of convert_to_texinfo to avoid spaces appearing in messages.,
Patrice Dumas <=