bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19462: shr: use wrap-prefix when possible, instead of filling the te


From: Lars Ingebrigtsen
Subject: bug#19462: shr: use wrap-prefix when possible, instead of filling the text
Date: Sun, 27 Dec 2015 07:22:55 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Clément Pit--Claudel <address@hidden> writes:

> I looked into this more, but I don't think it will work. I want to
> highlight the context of the element that contains the target id, so
> if lines are not broken up then highlighting the full line works
> well. If they are, on the other hand, then I can't tell how much
> surrounding text to highlight.

I'm not sure what you mean by "context".  But you can look "down" into
the DOM and see if your id is in an element there.  Or you can transform
the HTML, or transform the DOM, to wrap the elements you want to
highlight.

For instance, you can loop over all elements that have ids that match
with `dom-by-id', and you can alter the DOM to insert, say, h1 elements
around those that you want to have highlit.

Etc.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]