Bill Moseley wrote:
At 05:26 PM 3/26/2002 +0800, Stas Bekman wrote:


You mean replace \n with some flag (e.g. '#$%$#') only in <pre> sections?
\n in HTML should matter.

You suggested %0A in the previous email, but I was actually thinking to have all sentences separated with <br> rather than thrown altogether. no matter if it's HTML or <pre>


%0A will get indexed as 0A.

It's not really sentence based.  The highlighting code finds a word or
phrase, then flags the previous and next five words.  It stops highlighting
after finding six hits.  The "..." are added if words are skipped between
the ten snippets.

What you are saying is you find a hit, then flag backwards to the beginning
of the sentence, and flag forward to the end of the sentence, then display
that entire sentence, right?  I think that might end up with long snippets.
 Also phrases can match across sentences.

but we can find the end of the sentence, no? using the punctuation rules. (or for code by preserving/restoring \n) so at least we can put each matching phrase (part of a sentence) on a separate line, is that correct?


I think the *only* problem with the current matched text presentations, is mixing sentences (including code). If we keep the same presentation as we have now plus somehow keep separate sub-sentence on separate lines we have a perfect output.

I can't remember how the highlight code works (it varies in the different
highlighting modules).  One maintains a FIFO stack that always contains
enough words to show the context only.  Another splits the entire document
into an array.

I wonder if this is more tweaking than is needed for most users.  I'd think
in general seeing a word/phrase with five or so words on each side will
show the context.


Bill Moseley mailto:[EMAIL PROTECTED]



--


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to