Slide 7
Slide 7 text
"'5&3
package
Text::Md2Inao::Builder::Inao;
use
parent
qw/Text::Md2Inao::Builder/;
use
Text::Md2Inao::Builder::DSL;
case
default
=>
sub
{
my
($c,
$h)
=
@_;
fallback_to_html($h);
};
case
a
=>
sub
{
my
($c,
$h)
=
@_;
my
$url
=
$h-‐>attr('href');
my
$title
=
$h-‐>as_trimmed_text;
if
($url
and
$title)
{
return
sprintf
"%s◆注/◆%s◆/注◆",
$title,
$url;
}
else
{
return
fallback_to_html($h);
}
};
...