Hi,
Many thanks for this great module, very usefull in highlighting of localized and html-escaped text.
I tried to include it in my apache perl module using this schema :
$swish = SWISH::API->new('index');
$search = $swish->New_Search_Object;
$hiliter = SWISH::HiLiter->new(swish=>$swish, $query);
and in a loop :
$results = $search->Execute($query);
...
$hiliter->setq($query);
print $hiliter->light($hiliter->snip($text));
But the second call to light() fails :
* Using your swishhiliter.cgi example with two queries and hiliter calls, the second call to light() uses the first query to highlight text, despite of the setq() call
* Using your patch against the seach.cgi in a mod_perl configuration, the second call to light() falls in a endless loop.
Am I using setq() the way it is supposed to be called ? That is one HiLiter->new() with many setq() and light() ?
Now I create an new HiLiter for each new query and it works, but of course I would prefer to use the setq() way.
Regards,
Sylvain