CC: | chas.owens [...] gmail.com |
Subject: | Less than symbols are not being made into entities in =head2 directives. |
Less than symbols are not being made into entities in =head2 directives.
I would expect the following code to output
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<h2>X <<= Y</h2>
<p>This is the left bit-shift assignment operator. It is equivalent to</p>
<pre><code> X = X << Y</code></pre>
</body>
</html>
But the <h2> line is instead
<h2>X <<= Y</h2>
This causes problems when the XHTML is rendered.
#!/usr/bin/perl
use warnings;
use strict;
use Pod::Simple::XHTML;
my $parser = Pod::Simple::XHTML->new(output_fh => 1);
$parser->no_whining(1);
$parser->no_errata_section(1);
$parser->output_string(\my $str);
$parser->parse_string_document(join "", <DATA>);
print $str;
__DATA__
=head2 X <<= Y
This is the left bit-shift assignment operator. It is equivalent to
X = X << Y