[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: |
Clément Pit--Claudel |
Subject: |
bug#19462: shr: use wrap-prefix when possible, instead of filling the text |
Date: |
Sun, 27 Dec 2015 12:16:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 12/27/2015 07:22 AM, Lars Ingebrigtsen wrote:
> Clément Pit--Claudel <clement.pit@gmail.com> 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.
Thanks for the suggestions. It's not always obvious what element I want to
highlight, though, beyond "everything that ends up on the same line. It may be
that the thing I want to draw the attention of the user to is in a paragraph;
in that case, I highlight the full paragrahp. Or it may be in a title; in that
case, I highlight the full title. Or it may be part of a list; in that case I
only highlight the item that contains it.
When the text that shr inserts isn't wrapped, I just need to highlight the line
that contains that text after rendering is complete. When it is wrapped,
however, it becomes unclear what exactly to highlight.
Clément.
signature.asc
Description: OpenPGP digital signature
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Lars Ingebrigtsen, 2015/12/25
- Message not available
- Message not available
- Message not available
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Lars Ingebrigtsen, 2015/12/25
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Clément Pit--Claudel, 2015/12/26
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Clément Pit--Claudel, 2015/12/26
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Clément Pit--Claudel, 2015/12/26
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Lars Ingebrigtsen, 2015/12/27
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text,
Clément Pit--Claudel <=
- bug#19462: shr: use wrap-prefix when possible, instead of filling the text, Lars Ingebrigtsen, 2015/12/27