KinoSearch::Highlight::SimpleHTMLFormatter - surround highlight bits with tags


NAME

KinoSearch::Highlight::SimpleHTMLFormatter - surround highlight bits with tags

Back to Top


SYNOPSIS

    my $formatter = KinoSearch::Highlight::SimpleHTMLFormatter->new(
        pre_tag  => '<i>',
        post_tag => '</i>',
    );
    # returns "<i>foo</i>"
    my $highlighted = $formatter->highlight("foo");

Back to Top


DESCRIPTION

This subclass of KinoSearch::Highlight::Formatter highlights text by surrounding it with HTML ``strong'' tags.

Back to Top


METHODS

new

Constructor. Takes hash-style params.

    my $formatter = KinoSearch::Highlight::SimpleHTMLFormatter->new(
        pre_tag =>  '*', # default: '<strong>'
        post_tag => '*', # default: '</strong>'
    );

Back to Top


COPYRIGHT

Copyright 2006 Marvin Humphrey

Back to Top


LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.15.

Back to Top

 KinoSearch::Highlight::SimpleHTMLFormatter - surround highlight bits with tags