App-Basis
view release on metacpan or search on metacpan
lib/App/Basis.pm view on Meta::CPAN
{
my ($txt) = @_ ;
$txt =~ s/(\*{1,2})(?=\S)(.+?)(?<=\S)\1/\x1B[1m$2\x1B[22m/gs ;
$txt =~ s/(\_{1,2})(?=\S)(.+?)(?<=\S)\1/\x1B[4m$2\x1B[24m/gs ;
$txt =~ s/(\~{1,2})(?=\S)(.+?)(?<=\S)\1/\x1B[9m$2\x1B[29m/gs ;
return $txt ;
}
# for #color(text) or bg#bgcolor(text)
# virtually compatible with #RGBA(text)
# or for background via bg#RGBA(text)
sub _color
{
my ($txt) = @_ ;
$txt =~ s{(bg)?#([a-zA-Z0-9]{3,8})\((.+?)\)(?!\))}
{_get_color($1,$2,$3)}egs ;
return $txt ;
}
# for very important # Headers
# and for less important ## One
lib/App/Basis.pm view on Meta::CPAN
> With quoted sections
Is the idea
* behind
* all this
~~~striking~~~ UX for `shell` users too.
- - -
#green(green text)
bg#red(red background text)
" ;
=back
=head1 AUTHOR
Kevin Mulholland <moodfarm@cpan.org>
=head1 COPYRIGHT AND LICENSE
( run in 0.682 second using v1.01-cache-2.11-cpan-f56aa216473 )