[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sat, 17 Feb 2024 17:23:49 -0500 (EST) |
branch: master
commit da471ff9f8ff0c5d514f05246aa926ef9218f823
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Feb 17 23:23:36 2024 +0100
* doc/texi2any_api.texi (Element Direction Information Type),
tp/Texinfo/Convert/HTML.pm (%valid_direction_return_type)
(from_element_direction), tp/Texinfo/XS/convert/convert_html.c
(from_element_direction), tp/Texinfo/XS/main/converter_types.h (enum
html_text_type): remove the target direction information type of
from_element_direction, it is not used anymore and it is in general
better to get the href.
---
ChangeLog | 10 ++++++++++
doc/texi2any_api.texi | 5 -----
tp/Texinfo/Convert/HTML.pm | 8 --------
tp/Texinfo/XS/convert/convert_html.c | 9 ---------
tp/Texinfo/XS/main/converter_types.h | 1 -
tp/t/init/test_directions.init | 4 +++-
6 files changed, 13 insertions(+), 24 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 05bdd1c527..ad5d23a9f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-02-17 Patrice Dumas <pertusus@free.fr>
+
+ * doc/texi2any_api.texi (Element Direction Information Type),
+ tp/Texinfo/Convert/HTML.pm (%valid_direction_return_type)
+ (from_element_direction), tp/Texinfo/XS/convert/convert_html.c
+ (from_element_direction), tp/Texinfo/XS/main/converter_types.h (enum
+ html_text_type): remove the target direction information type of
+ from_element_direction, it is not used anymore and it is in general
+ better to get the href.
+
2024-02-17 Patrice Dumas <pertusus@free.fr>
* doc/texi2any_api.texi (Dynamic Converter Formatting Information),
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index 583a33c1de..4a90706648 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -1085,11 +1085,6 @@ A string representing the direction to be used in
contexts
with HTML elements (preformatted and normal contexts).
@xref{Init File Expansion Contexts}.
-@item target
-A string representing the target of the direction, typically used as id
-attribute in the output unit corresponding to the direction, and in href
-attribute.
-
@item node
Same as @code{text}, but selecting the node associated with the
element direction in priority.
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index e9e39b1e04..ea33df63e2 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1561,8 +1561,6 @@ my %valid_direction_return_type = (
# a string representing the direction to be used in contexts
# not restricted in term of available formatting (ie with HTML elements)
'text' => 1,
- # string representing the target, typically used as id and in href
- 'target' => 1,
# same as 'text', but select node in priority
'node' => 1,
# same as 'text_nonumber' but select section in priority
@@ -1699,12 +1697,6 @@ sub from_element_direction($$$;$$$)
} else {
return undef;
}
- } elsif ($type eq 'target') {
- if (defined($command)) {
- return $self->command_id($command);
- } else {
- return undef;
- }
}
}
} else {
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 0b64da0f63..6ed9593c26 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -4165,15 +4165,6 @@ from_element_direction (CONVERTER *self, int direction,
else
return 0;
}
- else if (type == HTT_target)
- {
- if (command)
- {
- return html_command_id (self, command);
- }
- else
- return 0;
- }
}
}
else
diff --git a/tp/Texinfo/XS/main/converter_types.h
b/tp/Texinfo/XS/main/converter_types.h
index 38f2baa607..9a5ab48266 100644
--- a/tp/Texinfo/XS/main/converter_types.h
+++ b/tp/Texinfo/XS/main/converter_types.h
@@ -181,7 +181,6 @@ enum html_text_type {
HTT_string_nonumber, /* not sure that it is set/used */
/* not only used for element text, also for direction text */
HTT_href,
- HTT_target,
HTT_node,
HTT_section,
};
diff --git a/tp/t/init/test_directions.init b/tp/t/init/test_directions.init
index a7c058a03e..4cdf11125e 100644
--- a/tp/t/init/test_directions.init
+++ b/tp/t/init/test_directions.init
@@ -16,7 +16,9 @@ foreach my $direction (@all_directions) {
my $direction_node = "node-".$direction;
my $direction_href = "href-".$direction;
my $direction_name = "name-".$direction;
- push @SECTION_BUTTONS, \"|", \$direction_node, [$direction, '-> node'],
\$direction_href, [$direction, '-> href'], \$direction_name, [$direction, '->
text'], \"|";
+ push @SECTION_BUTTONS, \"|", \$direction_node, [$direction, '-> node'],
+ \$direction_href, [$direction, '-> href'],
+ \$direction_name, [$direction, '-> text'],
\"|";
}
@MISC_BUTTONS = @SECTION_BUTTONS;