Skip to content

Commit 41db00b

Browse files
committed
Add support for all kinds of numbers in E<>
1 parent ad1bd15 commit 41db00b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Pod/To/HTML.pm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,12 @@ multi sub node2inline(Pod::FormattingCode $node) returns Str {
410410
when 'E' {
411411
return $node.content.split(q{;}).map({
412412
# Perl 6 numbers = Unicode codepoint numbers
413-
when /^ \d+ $/
414-
{ q{&#} ~ $_ ~ q{;} }
413+
when /^ '0d'? <(\d+)> $/
414+
{ q{&#} ~ $/ ~ q{;} }
415+
when /^ '0x' <(<.xdigit>+)> $/
416+
{ q{&#x} ~ $/ ~ q{;} }
417+
when /^ '0o' <(\d+)> $/
418+
{ q{&#} ~ :8(~$/) ~ q{;} }
415419
# Lowercase = HTML5 entity reference
416420
when /^ <[a..z]>+ $/
417421
{ q{&} ~ $_ ~ q{;} }

0 commit comments

Comments
 (0)