As there is no neat way to preserve both Pod highlighting
codes such as B<> and code coloring, for long time examples,
where for some reason the codes were used, were not colored.
As it's easier to understand what's what with Raku syntax in examples
such as:
my $excerpt = q:to/END/;
Here's some unimportant text.
=begin code
This code block is what we're after.
We'll use 'ff' to get it.
=end code
More unimportant text.
END
my @codelines = gather for $excerpt.lines {
take $_ if "=begin code" ff "=end code"
}
say @codelines.join("\n");
we address the same issue by prefering coloring over
codes like bold or italics. In code it means unwrapping the
Pod::FormattingCode nodes into text we can then highlight.
As there is no neat way to preserve both Pod highlighting codes such as
B<>
and code coloring, for long time examples, where for some reason the codes were used, were not colored.As it's easier to understand what's what with Raku syntax in examples such as:
we address the same issue by prefering coloring over codes like bold or italics. In code it means unwrapping the Pod::FormattingCode nodes into text we can then highlight.