# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+use warnings;
use strict;
use Data::Dumper;
use Term::ANSIColor;
use Maasha::Common;
+use Maasha::Filesys;
use vars qw ( @ISA @EXPORT );
@ISA = qw( Exporter );
}
elsif ( $block->[ 0 ]->{ 'FORMAT' } eq "verbatim" )
{
- map { push @lines, " $_->{ 'TEXT' }" } @{ $block };
+ map { push @lines, text_white( " $_->{ 'TEXT' }" ) } @{ $block };
}
elsif ( $block->[ 0 ]->{ 'FORMAT' } eq "itemize" )
{
my ( $fh, @lines, $i, $c, $section, $paragraph, @block, @output );
- $fh = Maasha::Common::read_open( $file );
+ $fh = Maasha::Filesys::file_read_open( $file );
@lines = <$fh>;
{
undef @block;
- if ( $lines[ $i ] =~ /^(#summary.+)/ )
+ if ( $lines[ $i ] =~ /(#summary.+)/ ) # TODO: unsolved problem with anchor!
{
$section = $1;
$c = $i;
- while ( $lines[ $c ] !~ /^\s*$/ )
+ while ( defined $lines[ $c ] and $lines[ $c ] !~ /^\s*$/ )
{
$paragraph .= " $lines[ $c ]";
my ( $txt,
) = @_;
- return colored ( $txt, "bold" );
+ return colored( $txt, "bold" );
}
my ( $txt,
) = @_;
- return colored ( $txt, "underline" );
+ return colored( $txt, "underline" );
+}
+
+sub text_white
+{
+ my ( $txt,
+ ) = @_;
+
+ return colored( $txt, "white" );
}