[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Only ignore one end of line after a brace command
From: |
Patrice Dumas |
Subject: |
branch master updated: Only ignore one end of line after a brace command before a brace |
Date: |
Sat, 27 Aug 2022 10:19:49 -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 44cd044343 Only ignore one end of line after a brace command before a
brace
44cd044343 is described below
commit 44cd044343036d2d208c366fd8b0aa3886d1838d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 27 16:19:31 2022 +0200
Only ignore one end of line after a brace command before a brace
* tp/Texinfo/ParserNonXS.pm (_parse_texi),
tp/Texinfo/XS/parsetexi/parser.c(process_remaining_on_line): only
ignore one newline after a brace command before a brace. Report
from Gavin.
---
ChangeLog | 9 ++
tp/Texinfo/ParserNonXS.pm | 27 +++-
tp/Texinfo/XS/parsetexi/parser.c | 46 ++++--
.../coverage/spaces_after_braced_command.pl | 45 ++++--
.../layout/res_parser/formatting/formatting.html | 18 ++-
.../layout/res_parser/formatting_chm/anchor.html | 3 +-
.../layout/res_parser/formatting_chm/chapter.html | 12 +-
.../layout/res_parser/formatting_chm/chapter2.html | 3 +-
.../res_parser/formatting_chm/formatting.html | 9 +-
.../res_parser/formatting_chm/formatting_abt.html | 3 +-
.../res_parser/formatting_chm/formatting_ovr.html | 3 +-
.../res_parser/formatting_chm/formatting_toc.html | 3 +-
.../layout/res_parser/formatting_chm/index.html | 3 +-
.../formatting_chm/s_002d_002dect_002cion.html | 3 +-
.../res_parser/formatting_chm/subsection.html | 3 +-
...tion-_0060_0060simple_002ddouble_002d_002d.html | 3 +-
...02d_002dfour_002d_002d_002d_002d_0027_0027.html | 3 +-
.../res_parser/formatting_docbook/formatting.xml | 12 +-
.../formatting_enable_encoding/formatting.html | 18 ++-
.../EPUB/xhtml/chapter.xhtml | 12 +-
.../EPUB/xhtml/chapter2.xhtml | 3 +-
.../EPUB/xhtml/formatting.xhtml | 9 +-
.../EPUB/xhtml/formatting_abt.xhtml | 3 +-
.../EPUB/xhtml/formatting_fot.xhtml | 3 +-
.../EPUB/xhtml/formatting_ovr.xhtml | 3 +-
.../EPUB/xhtml/formatting_toc.xhtml | 3 +-
.../EPUB/xhtml/chapter.xhtml | 12 +-
.../EPUB/xhtml/chapter2.xhtml | 3 +-
.../EPUB/xhtml/formatting.xhtml | 9 +-
.../EPUB/xhtml/formatting_abt.xhtml | 3 +-
.../EPUB/xhtml/formatting_fot.xhtml | 3 +-
.../EPUB/xhtml/formatting_ovr.xhtml | 3 +-
.../EPUB/xhtml/formatting_toc.xhtml | 3 +-
.../EPUB/xhtml/s_002d_002dect_002cion.xhtml | 3 +-
.../EPUB/xhtml/subsection.xhtml | 3 +-
...ion-_0060_0060simple_002ddouble_002d_002d.xhtml | 3 +-
...2d_002dfour_002d_002d_002d_002d_0027_0027.xhtml | 3 +-
.../res_parser/formatting_exotic/anchor.html | 3 +-
.../res_parser/formatting_exotic/chapter.html | 12 +-
.../res_parser/formatting_exotic/chapter2.html | 3 +-
.../formatting_exotic/formatting_abt.html | 3 +-
.../formatting_exotic/formatting_ovr.html | 3 +-
.../formatting_exotic/formatting_toc.html | 3 +-
.../layout/res_parser/formatting_exotic/index.html | 3 +-
.../formatting_exotic/s_002d_002dect_002cion.html | 3 +-
.../res_parser/formatting_exotic/subsection.html | 3 +-
...tion-_0060_0060simple_002ddouble_002d_002d.html | 3 +-
...02d_002dfour_002d_002d_002d_002d_0027_0027.html | 3 +-
.../res_parser/formatting_fr_icons/formatting.html | 18 ++-
.../res_parser/formatting_html/formatting.html | 18 ++-
.../res_parser/formatting_html32/formatting.html | 18 ++-
.../formatting_html_no_texi2html/formatting.html | 12 +-
.../res_parser/formatting_html_nodes/anchor.html | 3 +-
.../res_parser/formatting_html_nodes/chapter.html | 12 +-
.../res_parser/formatting_html_nodes/chapter2.html | 3 +-
.../formatting_html_nodes/formatting_abt.html | 3 +-
.../formatting_html_nodes/formatting_fot.html | 3 +-
.../formatting_html_nodes/formatting_ovr.html | 3 +-
.../formatting_html_nodes/formatting_toc.html | 3 +-
.../res_parser/formatting_html_nodes/index.html | 9 +-
.../s_002d_002dect_002cion.html | 3 +-
.../formatting_html_nodes/subsection.html | 3 +-
...tion-_0060_0060simple_002ddouble_002d_002d.html | 3 +-
...02d_002dfour_002d_002d_002d_002d_0027_0027.html | 3 +-
.../res_parser/formatting_info/formatting.info | 169 +++++++++++----------
.../formatting_inline_css/formatting.html | 18 ++-
.../res_parser/formatting_latex/formatting.tex | 15 +-
.../res_parser/formatting_mathjax/formatting.html | 18 ++-
.../layout/res_parser/formatting_nodes/anchor.html | 3 +-
.../res_parser/formatting_nodes/chapter.html | 12 +-
.../res_parser/formatting_nodes/chapter2.html | 3 +-
.../formatting_nodes/formatting_abt.html | 3 +-
.../formatting_nodes/formatting_fot.html | 3 +-
.../formatting_nodes/formatting_ovr.html | 3 +-
.../formatting_nodes/formatting_toc.html | 3 +-
.../layout/res_parser/formatting_nodes/index.html | 9 +-
.../formatting_nodes/s_002d_002dect_002cion.html | 3 +-
.../res_parser/formatting_nodes/subsection.html | 3 +-
...tion-_0060_0060simple_002ddouble_002d_002d.html | 3 +-
...02d_002dfour_002d_002d_002d_002d_0027_0027.html | 3 +-
.../formatting_numerical_entities/formatting.html | 18 ++-
.../res_parser/formatting_plaintext/formatting.txt | 135 ++++++++--------
.../res_parser/formatting_rawtext/formatting.txt | 6 +-
.../formatting_regions/formatting_regions.html | 18 ++-
.../res_parser/formatting_textcontent/formatting | 12 +-
.../formatting_weird_quotes/formatting.html | 18 ++-
.../res_parser/formatting_xhtml/formatting.html | 18 ++-
.../res_parser/formatting_xml/formatting.xml | 12 +-
.../res_parser/formatting_singular/anchor.html | 3 +-
.../res_parser/formatting_singular/chapter.html | 12 +-
.../res_parser/formatting_singular/chapter2.html | 3 +-
.../res_parser/formatting_singular/index.htm | 3 +-
.../res_parser/formatting_singular/index.html | 3 +-
.../s_002d_002dect_002cion.html | 3 +-
.../res_parser/formatting_singular/sing_abt.htm | 3 +-
.../res_parser/formatting_singular/sing_fot.htm | 3 +-
.../res_parser/formatting_singular/sing_ovr.htm | 3 +-
.../res_parser/formatting_singular/sing_toc.htm | 3 +-
.../res_parser/formatting_singular/subsection.html | 3 +-
...tion-_0060_0060simple_002ddouble_002d_002d.html | 3 +-
...02d_002dfour_002d_002d_002d_002d_0027_0027.html | 3 +-
101 files changed, 645 insertions(+), 380 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f27a687c87..1b178eb332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-08-27 Patrice Dumas <pertusus@free.fr>
+
+ Only ignore one end of line after a brace command before a brace
+
+ * tp/Texinfo/ParserNonXS.pm (_parse_texi),
+ tp/Texinfo/XS/parsetexi/parser.c(process_remaining_on_line): only
+ ignore one newline after a brace command before a brace. Report
+ from Gavin.
+
2022-08-27 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_parse_texi): remove comment on hack
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 53cd272eee..f472b2b645 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -4212,7 +4212,7 @@ sub _parse_texi($$$)
if ($current->{'cmdname'}
and defined($brace_commands{$current->{'cmdname'}})
and !$open_brace) {
- print STDERR "BRACE command \@$current->{'cmdname'}, no brace\n"
+ print STDERR "BRACE CMD \@$current->{'cmdname'}, no following brace\n"
if $self->{'DEBUG'};
# special case for @-command as argument of @itemize or @*table.
if (_command_with_command_as_argument($current->{'parent'})) {
@@ -4227,19 +4227,32 @@ sub _parse_texi($$$)
}
$current = $current->{'parent'};
# Note that non ascii spaces do not count as spaces
- } elsif ($line =~ s/^(\s+)//
+ } elsif ($line =~ /^(\s+)/
and ($accent_commands{$current->{'cmdname'}}
or $self->{'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME'})) {
my $added_space = $1;
- print STDERR "BRACE spaces ignored '$added_space'\n"
- if $self->{'DEBUG'};
- $current->{'extra'}->{'spaces'} = ''
- if (!defined($current->{'extra'}->{'spaces'}));
- $current->{'extra'}->{'spaces'} .= $added_space;
+ my $additional_newline;
if ($added_space =~ /\n/) {
$self->_line_warn(sprintf(
__("command `\@%s' must not be followed by new line"),
$current->{'cmdname'}), $source_info);
+ $additional_newline = 1;
+ }
+ print STDERR "BRACE CMD following command space ignored
'$added_space'\n"
+ if $self->{'DEBUG'};
+ if (!defined($current->{'extra'}->{'spaces'})) {
+ $line =~ s/^(\s+)//;
+ $current->{'extra'}->{'spaces'} = $added_space;
+ # only ignore spaces and one newline, two newlines lead to
+ # an empty line before the brace or argument which is incorrect.
+ } elsif ($additional_newline
+ and $current->{'extra'}->{'spaces'} =~ /\n/) {
+ $self->_line_error(sprintf(__("\@%s expected braces"),
+ $current->{'cmdname'}), $source_info);
+ $current = $current->{'parent'};
+ } else {
+ $line =~ s/^(\s+)//;
+ $current->{'extra'}->{'spaces'} .= $added_space;
}
# special case for accent commands, use following character except @
# as argument
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 8217f37d4a..25701e0b98 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1441,33 +1441,51 @@ superfluous_arg:
{
char *p; char *s;
int whitespaces_len;
+ int additional_newline = 0;
KEY_PAIR *k;
whitespaces_len = strspn (line, whitespace_chars);
- p = line + whitespaces_len;
+
+ for (int i = 0; i < whitespaces_len; i++)
+ {
+ if (*(line + i) == '\n')
+ {
+ line_warn ("command `@%s' must not be followed by new line",
+ command_name(current->cmd));
+ additional_newline = 1;
+ break;
+ }
+ }
+
k = lookup_extra (current, "spaces");
if (!k)
{
+ p = line + whitespaces_len;
xasprintf (&s, "%.*s", (int) (p - line), line);
add_extra_string (current, "spaces", s);
+ line = p;
}
else
{
- xasprintf (&s, "%s%.*s",
- (char *) k->value,
- (int) (p - line), line);
- free (k->value);
- k->value = (ELEMENT *) s;
- }
- for (int i = 0; i < whitespaces_len; i++)
- {
- if (*(line + i) == '\n')
+ /* only ignore spaces and one newline, two newlines lead to
+ an empty line before the brace or argument which is incorrect.
*/
+ char *previous_value = (char *) k->value;
+ if (additional_newline && strchr ("\n", *previous_value))
{
- line_warn ("command `@%s' must not be followed by new line",
- command_name(current->cmd));
- break;
+ line_error ("@%s expected braces",
+ command_name(current->cmd));
+ current = current->parent;
+ }
+ else
+ {
+ p = line + whitespaces_len;
+ xasprintf (&s, "%s%.*s",
+ *previous_value,
+ (int) (p - line), line);
+ free (k->value);
+ k->value = (ELEMENT *) s;
+ line = p;
}
}
- line = p;
}
/* special case for accent commands, use following character except @
* as argument */
diff --git a/tp/t/results/coverage/spaces_after_braced_command.pl
b/tp/t/results/coverage/spaces_after_braced_command.pl
index 177b271857..a2928748cb 100644
--- a/tp/t/results/coverage/spaces_after_braced_command.pl
+++ b/tp/t/results/coverage/spaces_after_braced_command.pl
@@ -97,18 +97,10 @@ $result_trees{'spaces_after_braced_command'} = {
{
'contents' => [
{
- 'args' => [
- {
- 'contents' => [],
- 'parent' => {},
- 'type' => 'brace_command_arg'
- }
- ],
'cmdname' => 'TeX',
'contents' => [],
'extra' => {
'spaces' => '
-
'
},
'parent' => {},
@@ -121,6 +113,11 @@ $result_trees{'spaces_after_braced_command'} = {
{
'parent' => {},
'text' => '
+'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
'
}
],
@@ -146,9 +143,9 @@
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[2]{'cont
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[2]{'contents'}[1]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[2];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[2]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[3]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0];
-$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'contents'}[0]{'args'}[0]{'parent'}
=
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'contents'}[0];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'contents'}[0]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'contents'}[1]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4];
+$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'contents'}[2]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'contents'}[4]{'parent'}
= $result_trees{'spaces_after_braced_command'}{'contents'}[0];
$result_trees{'spaces_after_braced_command'}{'contents'}[0]{'parent'} =
$result_trees{'spaces_after_braced_command'};
@@ -159,7 +156,7 @@ $result_texis{'spaces_after_braced_command'} = '@code {b}
@TeX
-{}
+
';
@@ -168,6 +165,7 @@ $result_texts{'spaces_after_braced_command'} = 'b
v
TeX
+
';
$result_errors{'spaces_after_braced_command'} = [
@@ -197,6 +195,33 @@ $result_errors{'spaces_after_braced_command'} = [
'macro' => '',
'text' => 'command `@TeX\' must not be followed by new line',
'type' => 'warning'
+ },
+ {
+ 'error_line' => '@TeX expected braces
+',
+ 'file_name' => '',
+ 'line_nr' => 7,
+ 'macro' => '',
+ 'text' => '@TeX expected braces',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => 'misplaced {
+',
+ 'file_name' => '',
+ 'line_nr' => 8,
+ 'macro' => '',
+ 'text' => 'misplaced {',
+ 'type' => 'error'
+ },
+ {
+ 'error_line' => 'misplaced }
+',
+ 'file_name' => '',
+ 'line_nr' => 8,
+ 'macro' => '',
+ 'text' => 'misplaced }',
+ 'type' => 'error'
}
];
diff --git a/tp/tests/layout/res_parser/formatting/formatting.html
b/tp/tests/layout/res_parser/formatting/formatting.html
index d6cb2d9744..3b387c5c37 100644
--- a/tp/tests/layout/res_parser/formatting/formatting.html
+++ b/tp/tests/layout/res_parser/formatting/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1831,7 +1832,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2907,7 +2909,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4039,7 +4042,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -5113,7 +5117,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -6329,7 +6334,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_chm/anchor.html
b/tp/tests/layout/res_parser/formatting_chm/anchor.html
index fe0aec441e..19eea1b795 100644
--- a/tp/tests/layout/res_parser/formatting_chm/anchor.html
+++ b/tp/tests/layout/res_parser/formatting_chm/anchor.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter.html
b/tp/tests/layout/res_parser/formatting_chm/chapter.html
index bbdd640b5e..e5b5d7c811 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1827,7 +1828,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2901,7 +2903,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4117,7 +4120,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter2.html
b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
index 6aecca5ed0..e5209ebe86 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting.html
b/tp/tests/layout/res_parser/formatting_chm/formatting.html
index 60cf1340ac..a50b030fec 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1815,7 +1816,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2891,7 +2893,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
b/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
index bbf89a8df3..29a0f9a59b 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
b/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
index 30481b70f3..f86dfe7438 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
b/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
index af14e7b50a..06b181018c 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/index.html
b/tp/tests/layout/res_parser/formatting_chm/index.html
index 4cc1530972..1f6ca32432 100644
--- a/tp/tests/layout/res_parser/formatting_chm/index.html
+++ b/tp/tests/layout/res_parser/formatting_chm/index.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
b/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
index 6c7dbbb2b8..ab452ca68a 100644
--- a/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
+++ b/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_chm/subsection.html
b/tp/tests/layout/res_parser/formatting_chm/subsection.html
index 18a6c64004..109535a4f6 100644
--- a/tp/tests/layout/res_parser/formatting_chm/subsection.html
+++ b/tp/tests/layout/res_parser/formatting_chm/subsection.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
index dbe7079d70..4ae610921b 100644
---
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
+++
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
index a1998f2e79..071c7a14f8 100644
---
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
+++
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_docbook/formatting.xml
b/tp/tests/layout/res_parser/formatting_docbook/formatting.xml
index 7123463e0f..ce2fe6d761 100644
--- a/tp/tests/layout/res_parser/formatting_docbook/formatting.xml
+++ b/tp/tests/layout/res_parser/formatting_docbook/formatting.xml
@@ -756,7 +756,8 @@ docbook ''
@U{110000}, value just beyond Unicode �
</para>
<!-- braces missing -->
-<para>@TeX, but without brace &tex;<!-- unknown command -->
+<para>@TeX, but without brace &tex;
+<!-- unknown command -->
<literal>@#</literal> #
</para>
<!-- no arg -->
@@ -1670,7 +1671,8 @@ docbook ''
@U{110000}, value just beyond Unicode �
</para>
<!-- braces missing -->
-<para>@TeX, but without brace &tex;<!-- unknown command -->
+<para>@TeX, but without brace &tex;
+<!-- unknown command -->
<literal>@#</literal> #
</para>
<!-- no arg -->
@@ -2571,7 +2573,8 @@ docbook ''
@U{110000}, value just beyond Unicode �
</para>
<!-- braces missing -->
-<para>@TeX, but without brace &tex;<!-- unknown command -->
+<para>@TeX, but without brace &tex;
+<!-- unknown command -->
<literal>@#</literal> #
</para>
<!-- no arg -->
@@ -3464,7 +3467,8 @@ Invalid use of @':
@U{110000}, value just beyond Unicode �
<!-- braces missing -->
-@TeX, but without brace &tex;<!-- unknown command -->
+@TeX, but without brace &tex;
+<!-- unknown command -->
<literal>@#</literal> #
<!-- no arg -->
diff --git
a/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
b/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
index 508717dda0..5e184f38f9 100644
--- a/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_enable_encoding/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1831,7 +1832,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2907,7 +2909,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4039,7 +4042,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -5113,7 +5117,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -6329,7 +6334,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
index 70cb3f4792..690dcef58f 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1827,7 +1828,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2901,7 +2903,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4117,7 +4120,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
index f72bd390d0..0cf9d95f2f 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting.xhtml
index 8a7c520c32..0eff7ca737 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1814,7 +1815,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2890,7 +2892,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
index fdee951fef..92ed71d103 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
index feb4045480..5ee030114a 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
index c1c67783a3..636f1808af 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
index 839b5d4f5c..d73614b7b3 100644
---
a/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
index 286e19aeeb..3c9e9e3233 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1828,7 +1829,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2902,7 +2904,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4118,7 +4121,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
index 4c74c8e566..d858fa979c 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/chapter2.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting.xhtml
index a3828e87c0..5237bf3ea6 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1816,7 +1817,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2892,7 +2894,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
index 85a7a1d5e1..5667d09fd9 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_abt.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
index c801ee709d..6858c07d69 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_fot.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
index 5b09269415..e2bce7d4dd 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_ovr.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
index 2cafe7079c..435c4bd0df 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/formatting_toc.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/s_002d_002dect_002cion.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/s_002d_002dect_002cion.xhtml
index 8beeec5e00..8ad0ed307a 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/s_002d_002dect_002cion.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/s_002d_002dect_002cion.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsection.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsection.xhtml
index bb51e66432..8058f19b99 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsection.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsection.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-_0060_0060simple_002ddouble_002d_002d.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-_0060_0060simple_002ddouble_002d_002d.xhtml
index 51a25e66f1..070dba5776 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-_0060_0060simple_002ddouble_002d_002d.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-_0060_0060simple_002ddouble_002d_002d.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.xhtml
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.xhtml
index 2dc4906e60..f5e5e1842b 100644
---
a/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.xhtml
+++
b/tp/tests/layout/res_parser/formatting_epub_nodes/formatting_epub_package/EPUB/xhtml/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.xhtml
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/anchor.html
b/tp/tests/layout/res_parser/formatting_exotic/anchor.html
index 4b3ffb9628..58e8ff9a82 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/anchor.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/anchor.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/chapter.html
b/tp/tests/layout/res_parser/formatting_exotic/chapter.html
index 636439364a..4397bafc29 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/chapter.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1846,7 +1847,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2920,7 +2922,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4132,7 +4135,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
b/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
index 0f703af188..1967af8151 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/chapter2.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/formatting_abt.html
b/tp/tests/layout/res_parser/formatting_exotic/formatting_abt.html
index c60df7bc58..792de3cfaa 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/formatting_abt.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/formatting_abt.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/formatting_ovr.html
b/tp/tests/layout/res_parser/formatting_exotic/formatting_ovr.html
index 6f79ad5b6d..dfd7eb4297 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/formatting_ovr.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/formatting_ovr.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/formatting_toc.html
b/tp/tests/layout/res_parser/formatting_exotic/formatting_toc.html
index fd81c74c84..5591c7c854 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/formatting_toc.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/formatting_toc.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/index.html
b/tp/tests/layout/res_parser/formatting_exotic/index.html
index ce10f52447..1f876396f7 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/index.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/index.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_exotic/s_002d_002dect_002cion.html
b/tp/tests/layout/res_parser/formatting_exotic/s_002d_002dect_002cion.html
index b3e0c04bf8..d50ed8023e 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/s_002d_002dect_002cion.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/s_002d_002dect_002cion.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_exotic/subsection.html
b/tp/tests/layout/res_parser/formatting_exotic/subsection.html
index aba370c2dc..a421540d66 100644
--- a/tp/tests/layout/res_parser/formatting_exotic/subsection.html
+++ b/tp/tests/layout/res_parser/formatting_exotic/subsection.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_exotic/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
b/tp/tests/layout/res_parser/formatting_exotic/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
index db266a5771..3638f5c5c2 100644
---
a/tp/tests/layout/res_parser/formatting_exotic/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
+++
b/tp/tests/layout/res_parser/formatting_exotic/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_exotic/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
b/tp/tests/layout/res_parser/formatting_exotic/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
index f6537662a6..6b9beaa1fa 100644
---
a/tp/tests/layout/res_parser/formatting_exotic/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
+++
b/tp/tests/layout/res_parser/formatting_exotic/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
index e3663f55ab..c77249aa10 100644
--- a/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_fr_icons/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1831,7 +1832,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2907,7 +2909,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4039,7 +4042,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -5113,7 +5117,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -6329,7 +6334,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_html/formatting.html
b/tp/tests/layout/res_parser/formatting_html/formatting.html
index d6cb2d9744..3b387c5c37 100644
--- a/tp/tests/layout/res_parser/formatting_html/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1831,7 +1832,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2907,7 +2909,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4039,7 +4042,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -5113,7 +5117,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -6329,7 +6334,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_html32/formatting.html
b/tp/tests/layout/res_parser/formatting_html32/formatting.html
index 463d25f32f..24f72d9f3d 100644
--- a/tp/tests/layout/res_parser/formatting_html32/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html32/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1767,7 +1768,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code>@#</code> #
+<p>@TeX, but without brace TeX
+<code>@#</code> #
</p>
<p><code>@w{--a}</code> -a<!-- /@w -->
</p>
@@ -2817,7 +2819,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code>@#</code> #
+<p>@TeX, but without brace TeX
+<code>@#</code> #
</p>
<p><code>@w{--a}</code> -a<!-- /@w -->
</p>
@@ -3923,7 +3926,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code>@#</code> #
+<p>@TeX, but without brace TeX
+<code>@#</code> #
</p>
<p><code>@w{--a}</code> -a<!-- /@w -->
</p>
@@ -4971,7 +4975,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code>@#</code> #
+<p>@TeX, but without brace TeX
+<code>@#</code> #
</p>
<p><code>@w{--a}</code> -a<!-- /@w -->
</p>
@@ -6160,7 +6165,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code>@#</code> #
+@TeX, but without brace TeX
+<code>@#</code> #
<code>@w{--a}</code> --a<!-- /@w -->
diff --git
a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
index 72d71ce1df..0e69c7f605 100644
--- a/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_html_no_texi2html/formatting.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1885,7 +1886,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2959,7 +2961,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4175,7 +4178,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/anchor.html
b/tp/tests/layout/res_parser/formatting_html_nodes/anchor.html
index fe0aec441e..19eea1b795 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/anchor.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/anchor.html
@@ -725,7 +725,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
b/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
index 49157114df..3c2fcc679a 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/chapter.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1847,7 +1848,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2921,7 +2923,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -4137,7 +4140,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
-@TeX, but without brace TeX<code class="code">@#</code> #
+@TeX, but without brace TeX
+<code class="code">@#</code> #
<code class="code">@w{--a}</code> --a<!-- /@w -->
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
b/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
index 907ffa30d2..b4241e0b5d 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/chapter2.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_abt.html
b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_abt.html
index 35eed03d69..89f4a75041 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_abt.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_abt.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_fot.html
b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_fot.html
index 2324128fd4..1e3fbc606d 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_fot.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_fot.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_ovr.html
b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_ovr.html
index 8337632540..d22ca217a9 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_ovr.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_ovr.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_toc.html
b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_toc.html
index 3f723d90c1..fdcc1de8a8 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/formatting_toc.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/formatting_toc.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/index.html
b/tp/tests/layout/res_parser/formatting_html_nodes/index.html
index 399ec29680..9a3f259d28 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/index.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/index.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
@@ -1820,7 +1821,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
@@ -2896,7 +2898,8 @@ html ''
@U{FFFFFFFFFFFFFF}, value much too large �
@U{110000}, value just beyond Unicode �
</p>
-<p>@TeX, but without brace TeX<code class="code">@#</code> #
+<p>@TeX, but without brace TeX
+<code class="code">@#</code> #
</p>
<p><code class="code">@w{--a}</code> –a<!-- /@w -->
</p>
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/s_002d_002dect_002cion.html
b/tp/tests/layout/res_parser/formatting_html_nodes/s_002d_002dect_002cion.html
index 2155358c4b..b97e8a4699 100644
---
a/tp/tests/layout/res_parser/formatting_html_nodes/s_002d_002dect_002cion.html
+++
b/tp/tests/layout/res_parser/formatting_html_nodes/s_002d_002dect_002cion.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_html_nodes/subsection.html
b/tp/tests/layout/res_parser/formatting_html_nodes/subsection.html
index 14c058be39..9cd9a9b677 100644
--- a/tp/tests/layout/res_parser/formatting_html_nodes/subsection.html
+++ b/tp/tests/layout/res_parser/formatting_html_nodes/subsection.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
b/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
index 2d4991cde1..02ef65c92b 100644
---
a/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
+++
b/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git
a/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
b/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
index a1c88fc420..e63bbdcfc0 100644
---
a/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
+++
b/tp/tests/layout/res_parser/formatting_html_nodes/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
@@ -724,7 +724,8 @@ Invalid use of @':
@U{FFFFFFFFFFFFFF}, value much too large FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode 110000
-@TeX, but without brace TeX@# #
+@TeX, but without brace TeX
+@# #
@w{-a} -a
diff --git a/tp/tests/layout/res_parser/formatting_info/formatting.info
b/tp/tests/layout/res_parser/formatting_info/formatting.info
index d13f10bd3a..5a35534032 100644
--- a/tp/tests/layout/res_parser/formatting_info/formatting.info
+++ b/tp/tests/layout/res_parser/formatting_info/formatting.info
@@ -566,7 +566,7 @@ a
@U{abc}, with <4 hex digits ઼ @U{FFFFFFFFFFFFFF}, value much too large
U+FFFFFFFFFFFFFF @U{110000}, value just beyond Unicode U+110000
- @TeX, but without brace TeX'@#' #
+ @TeX, but without brace TeX '@#' #
'@w{--a}' -a
@@ -1276,7 +1276,7 @@ a
@U{abc}, with <4 hex digits ઼ @U{FFFFFFFFFFFFFF}, value much too large
U+FFFFFFFFFFFFFF @U{110000}, value just beyond Unicode U+110000
- @TeX, but without brace TeX'@#' #
+ @TeX, but without brace TeX '@#' #
'@w{--a}' -a
@@ -1943,7 +1943,7 @@ a
@U{abc}, with <4 hex digits ઼ @U{FFFFFFFFFFFFFF}, value much too large
U+FFFFFFFFFFFFFF @U{110000}, value just beyond Unicode U+110000
- @TeX, but without brace TeX'@#' #
+ @TeX, but without brace TeX '@#' #
'@w{--a}' -a
@@ -2771,7 +2771,8 @@ cross ref name: (file name). '@inforef{}' *note ::
@U{FFFFFFFFFFFFFF}, value much too large U+FFFFFFFFFFFFFF
@U{110000}, value just beyond Unicode U+110000
- @TeX, but without brace TeX@# #
+ @TeX, but without brace TeX
+ @# #
@w{--a} --a
@@ -2894,14 +2895,14 @@ aaa"