[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/init/html32.pm: do not use − , protect
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/init/html32.pm: do not use − , protect with html32_format_protect_text to avoid " . |
Date: |
Thu, 13 Oct 2022 16:19:54 -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 c73987c25b * tp/init/html32.pm: do not use −, protect with
html32_format_protect_text to avoid ".
c73987c25b is described below
commit c73987c25b06ab849fc56d543ba2146ba5311b17
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Oct 13 22:19:43 2022 +0200
* tp/init/html32.pm: do not use −, protect with
html32_format_protect_text to avoid ".
---
ChangeLog | 5 ++
tp/init/html32.pm | 38 +++++-----
.../res_parser/formatting_html32/formatting.html | 80 +++++++++++-----------
3 files changed, 64 insertions(+), 59 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd55aec5eb..d47607be33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-10-13 Patrice Dumas <pertusus@free.fr>
+
+ * tp/init/html32.pm: do not use −, protect with
+ html32_format_protect_text to avoid ".
+
2022-10-13 Patrice Dumas <pertusus@free.fr>
Use − for @minus{} in HTML output
diff --git a/tp/init/html32.pm b/tp/init/html32.pm
index 48ce142dcd..d50144a2c7 100644
--- a/tp/init/html32.pm
+++ b/tp/init/html32.pm
@@ -38,7 +38,6 @@ use strict;
use Texinfo::Common;
-use Texinfo::Convert::Converter qw(xml_protect_text);
use Texinfo::Convert::Text;
@@ -71,14 +70,30 @@ texinfo_set_from_init_file('MENU_SYMBOL', '*');
texinfo_set_from_init_file('OPEN_QUOTE_SYMBOL', '`');
texinfo_set_from_init_file('CLOSE_QUOTE_SYMBOL', "'");
+
+# " is not in html 3.2
+sub html32_format_protect_text($$)
+{
+ my $converter = shift;
+ my $text = shift;
+ $text =~ s/&/&/g;
+ $text =~ s/</</g;
+ $text =~ s/>/>/g;
+ $text =~ s/\"/"/g;
+ $text =~ s/\f//g;
+ return $text;
+}
+
+texinfo_register_formatting_function('format_protect_text',
\&html32_format_protect_text);
+
+
foreach my $command ('euro', 'geq', 'leq',
- 'bullet', 'equiv', 'expansion', 'point', 'result', 'arrow',
+ 'bullet', 'equiv', 'expansion', 'minus', 'point', 'result', 'arrow',
'quotedblleft', 'quotedblright',
'quoteleft', 'quoteright',
'quotedblbase', 'quotesinglbase', 'guillemetleft', 'guillemetright',
'guillemotleft', 'guillemotright', 'guilsinglleft', 'guilsinglright') {
-
- my $formatted_command = xml_protect_text(undef,
+ my $formatted_command = html32_format_protect_text(undef,
$Texinfo::Convert::Text::text_brace_no_arg_commands{$command});
texinfo_register_no_arg_command_formatting($command, undef,
$formatted_command);
}
@@ -112,21 +127,6 @@ sub html32_setup($)
}
-# " is not in html 3.2
-sub html32_format_protect_text($$)
-{
- my $converter = shift;
- my $text = shift;
- $text =~ s/&/&/g;
- $text =~ s/</</g;
- $text =~ s/>/>/g;
- $text =~ s/\"/"/g;
- $text =~ s/\f//g;
- return $text;
-}
-
-texinfo_register_formatting_function('format_protect_text',
\&html32_format_protect_text);
-
sub html32_format_separate_anchor($$;$)
{
my $self = shift;
diff --git a/tp/tests/layout/res_parser/formatting_html32/formatting.html
b/tp/tests/layout/res_parser/formatting_html32/formatting.html
index 952301184c..98e44f562b 100644
--- a/tp/tests/layout/res_parser/formatting_html32/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html32/formatting.html
@@ -926,7 +926,7 @@ but , ,
@equiv ==
@error error->
@expansion ==>
-@minus −
+@minus -
@point -!-
@print -|
@result =>
@@ -955,8 +955,8 @@ but , ,
@ordf ª
@ordm º
@comma ,
-@quotedblleft "
-@quotedblright "
+@quotedblleft "
+@quotedblright "
@quoteleft `
@quoteright '
@quotedblbase ,,
@@ -995,7 +995,7 @@ but , ,
<code>@i{--a}</code> <i>-a</i>
<code>@kbd{--a}</code> <kbd>--a</kbd>
<code>@key{--a}</code> <kbd>--a</kbd>
-<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}}
−</em>
+<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}} -</em>
<code>@option{--a}</code> <samp>--a</samp>
<code>@r{--a}</code> -a
<code>@samp{--a}</code> `<samp>--a</samp>'
@@ -1073,12 +1073,12 @@ a sunny day
<div><em>->
u
* © ... ... ==
-error-> ==> − -| =>
+error-> ==> - -| =>
Å æ œ Æ Œ ø Ø ß ł Ł
Ð
Þ ð þ ¡ ¿ £
ª º ,
</em></div>
-<div><em>" "
+<div><em>" "
` ' ,, , <<
>> << >> <
> Euro -> <= >=
@@ -1237,7 +1237,7 @@ error-> ==> − -| =>
</li></ul>
<ul>
-<li>− minu-s
+<li>- minu-s
</li></ul>
<ul>
@@ -1742,7 +1742,7 @@ html ''
<code>@abbr{@'E--. @comma{}A., @'Etude--@comma{} @b{Autonome} }</code>
É-. ,A. (Étude-, <b>Autonome</b>)
<code>@abbr{@'E--. @comma{}A.}</code> É-. ,A.
</p>
-<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a−
{\frac{1}{2}}</em>
+<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a- {\frac{1}{2}}</em>
</p>
@@ -1977,7 +1977,7 @@ but , ,
@equiv ==
@error error->
@expansion ==>
-@minus −
+@minus -
@point -!-
@print -|
@result =>
@@ -2006,8 +2006,8 @@ but , ,
@ordf ª
@ordm º
@comma ,
-@quotedblleft "
-@quotedblright "
+@quotedblleft "
+@quotedblright "
@quoteleft `
@quoteright '
@quotedblbase ,,
@@ -2046,7 +2046,7 @@ but , ,
<code>@i{--a}</code> <i>-a</i>
<code>@kbd{--a}</code> <kbd>--a</kbd>
<code>@key{--a}</code> <kbd>--a</kbd>
-<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}}
−</em>
+<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}} -</em>
<code>@option{--a}</code> <samp>--a</samp>
<code>@r{--a}</code> -a
<code>@samp{--a}</code> `<samp>--a</samp>'
@@ -2124,12 +2124,12 @@ a sunny day
<div><em>->
u
* © ... ... ==
-error-> ==> − -| =>
+error-> ==> - -| =>
Å æ œ Æ Œ ø Ø ß ł Ł
Ð
Þ ð þ ¡ ¿ £
ª º ,
</em></div>
-<div><em>" "
+<div><em>" "
` ' ,, , <<
>> << >> <
> Euro -> <= >=
@@ -2288,7 +2288,7 @@ error-> ==> − -| =>
</li></ul>
<ul>
-<li>− minu-s
+<li>- minu-s
</li></ul>
<ul>
@@ -2793,7 +2793,7 @@ html ''
<code>@abbr{@'E--. @comma{}A., @'Etude--@comma{} @b{Autonome} }</code>
É-. ,A. (Étude-, <b>Autonome</b>)
<code>@abbr{@'E--. @comma{}A.}</code> É-. ,A.
</p>
-<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a−
{\frac{1}{2}}</em>
+<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a- {\frac{1}{2}}</em>
</p>
@@ -3084,7 +3084,7 @@ but , ,
@equiv ==
@error error->
@expansion ==>
-@minus −
+@minus -
@point -!-
@print -|
@result =>
@@ -3113,8 +3113,8 @@ but , ,
@ordf ª
@ordm º
@comma ,
-@quotedblleft "
-@quotedblright "
+@quotedblleft "
+@quotedblright "
@quoteleft `
@quoteright '
@quotedblbase ,,
@@ -3153,7 +3153,7 @@ but , ,
<code>@i{--a}</code> <i>-a</i>
<code>@kbd{--a}</code> <kbd>--a</kbd>
<code>@key{--a}</code> <kbd>--a</kbd>
-<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}}
−</em>
+<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}} -</em>
<code>@option{--a}</code> <samp>--a</samp>
<code>@r{--a}</code> -a
<code>@samp{--a}</code> `<samp>--a</samp>'
@@ -3231,12 +3231,12 @@ a sunny day
<div><em>->
u
* © ... ... ==
-error-> ==> − -| =>
+error-> ==> - -| =>
Å æ œ Æ Œ ø Ø ß ł Ł
Ð
Þ ð þ ¡ ¿ £
ª º ,
</em></div>
-<div><em>" "
+<div><em>" "
` ' ,, , <<
>> << >> <
> Euro -> <= >=
@@ -3395,7 +3395,7 @@ error-> ==> − -| =>
</li></ul>
<ul>
-<li>− minu-s
+<li>- minu-s
</li></ul>
<ul>
@@ -3900,7 +3900,7 @@ html ''
<code>@abbr{@'E--. @comma{}A., @'Etude--@comma{} @b{Autonome} }</code>
É-. ,A. (Étude-, <b>Autonome</b>)
<code>@abbr{@'E--. @comma{}A.}</code> É-. ,A.
</p>
-<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a−
{\frac{1}{2}}</em>
+<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a- {\frac{1}{2}}</em>
</p>
@@ -4133,7 +4133,7 @@ but , ,
@equiv ==
@error error->
@expansion ==>
-@minus −
+@minus -
@point -!-
@print -|
@result =>
@@ -4162,8 +4162,8 @@ but , ,
@ordf ª
@ordm º
@comma ,
-@quotedblleft "
-@quotedblright "
+@quotedblleft "
+@quotedblright "
@quoteleft `
@quoteright '
@quotedblbase ,,
@@ -4202,7 +4202,7 @@ but , ,
<code>@i{--a}</code> <i>-a</i>
<code>@kbd{--a}</code> <kbd>--a</kbd>
<code>@key{--a}</code> <kbd>--a</kbd>
-<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}}
−</em>
+<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}} -</em>
<code>@option{--a}</code> <samp>--a</samp>
<code>@r{--a}</code> -a
<code>@samp{--a}</code> `<samp>--a</samp>'
@@ -4280,12 +4280,12 @@ a sunny day
<div><em>->
u
* © ... ... ==
-error-> ==> − -| =>
+error-> ==> - -| =>
Å æ œ Æ Œ ø Ø ß ł Ł
Ð
Þ ð þ ¡ ¿ £
ª º ,
</em></div>
-<div><em>" "
+<div><em>" "
` ' ,, , <<
>> << >> <
> Euro -> <= >=
@@ -4444,7 +4444,7 @@ error-> ==> − -| =>
</li></ul>
<ul>
-<li>− minu-s
+<li>- minu-s
</li></ul>
<ul>
@@ -4949,7 +4949,7 @@ html ''
<code>@abbr{@'E--. @comma{}A., @'Etude--@comma{} @b{Autonome} }</code>
É-. ,A. (Étude-, <b>Autonome</b>)
<code>@abbr{@'E--. @comma{}A.}</code> É-. ,A.
</p>
-<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a−
{\frac{1}{2}}</em>
+<p><code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a- {\frac{1}{2}}</em>
</p>
@@ -5187,7 +5187,7 @@ but , ,
@equiv ==
@error error->
@expansion ==>
-@minus −
+@minus -
@point -!-
@print -|
@result =>
@@ -5216,8 +5216,8 @@ but , ,
@ordf ª
@ordm º
@comma ,
-@quotedblleft "
-@quotedblright "
+@quotedblleft "
+@quotedblright "
@quoteleft `
@quoteright '
@quotedblbase ,,
@@ -5256,7 +5256,7 @@ but , ,
<code>@i{--a}</code> <i>--a</i>
<code>@kbd{--a}</code> <kbd>--a</kbd>
<code>@key{--a}</code> <kbd>--a</kbd>
-<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}}
−</em>
+<code>@math{--a {\frac{1}{2}} @minus{}}</code> <em>--a {\frac{1}{2}} -</em>
<code>@option{--a}</code> <samp>--a</samp>
<code>@r{--a}</code> -a
<code>@samp{--a}</code> `<samp>--a</samp>'
@@ -5342,13 +5342,13 @@ a sunny day
</pre><div><em>->
u
* © ... ... ==
-error-> ==> − -| =>
+error-> ==> - -| =>
Å æ œ Æ Œ ø Ø ß ł Ł
Ð
Þ ð þ ¡ ¿ £
ª º ,
</em></div><pre>
-</pre><div><em>" "
+</pre><div><em>" "
` ' ,, , <<
>> << >> <
> Euro -> <= >=
@@ -5541,7 +5541,7 @@ error-> ==> − -| =>
<pre>
</pre><ul>
-<li>− <pre>minu--s
+<li>- <pre>minu--s
</pre></li></ul>
<pre>
@@ -6135,7 +6135,7 @@ html ''
<code>@abbr{@'E--. @comma{}A., @'Etude--@comma{} @b{Autonome} }</code>
É--. ,A. (Étude--, <b>Autonome</b>)
<code>@abbr{@'E--. @comma{}A.}</code> É--. ,A.
-<code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a− {\frac{1}{2}}</em>
+<code>@math{--a@minus{} {\frac{1}{2}}}</code> <em>--a- {\frac{1}{2}}</em>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/init/html32.pm: do not use − , protect with html32_format_protect_text to avoid " .,
Patrice Dumas <=