[wp-hackers] Improving Pingback Excerpts

Michel Valdrighi michelv at gmail.com
Tue Feb 15 23:12:49 GMT 2005


On Tue, 15 Feb 2005 15:06:11 -0500, Mark Jaquith
<mark.wordpress at txfx.net> wrote:
> Could we use <p> </p> as boundaries?  Like... only include text within
> the same paragraph that the link is in?  It may never be perfect, as you
> can't control how other sites present their entries, but I think it
> could make some educated guesses as to where the post's boundaries are.
> Another thing would be to consider <h2> or <h3> to be a boundary, so
> that the title or date don't get included, and to consider all <div>s to
> be boundaries as well.

Ideally, the script would match the entire block in which the link is
located, then it may truncate the block's content if it is too long.
Now someone write a parser for this. ;)

-- 
Michel Valdrighi
Devéloppeur Web Intraordinaire
http://zengun.org/weblog/


More information about the hackers mailing list