lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV Loosing underline


From: Klaus Weide
Subject: Re: LYNX-DEV Loosing underline
Date: Tue, 26 Nov 1996 21:30:38 -0600 (CST)

On Tue, 26 Nov 1996, Wayne Buttles wrote:

> It looks to me like there is a bug in HTML.c.  The following drops the
> underlining when it hits the link:

Although it's not totally clear what you mean with "when it hits the
link", I guess you mean that the word "here" is appearing differently
from the words "This is strong".

However what you observe is not always true: Lynx compiled with Slang,
as well as a (somewhat dated) version of Lynx with Rob's patches, show
the "here" as you would expect.

> <strong>This is strong <a href="text.htm">text</a> here.</strong>
> 
> The reason seems to be that although there is code in HTML_end_element to
> check for an underline restart, it is an impossible case:
> 
> if (Underline_Level > 0 && B_inUnderline == FALSE) {
>     HText_appendCharacter(me->text,LY_UNDERLINE_START_CHAR);
>     B_inUnderline = TRUE;
> }
> 
> The HTML_A in HTML_start_element doesn't set B_inUnderline to FALSE when
> it turns on bold for the link.  I would have to guess that we meant to
> do so since the above code will set B_inUnderline to TRUE if the condition
> is satisfied.

I am not following in detail how the HTML.c functions keep track of
underlining and bolding, but since that already works OK for some
of the display systems, maybe the fix shouldn't be in HTML.c.

Actually, I think the HTML_A in HTML_start_element should *not* set
B_inUnderline to FALSE, since it doesn't emit a LY_UNDERLINE_END_CHAR.
(That's why the word "text" in your example appears different from
a link which is not within a <STRONG>...</STRONG> or similar element,
at least if the curses/ncurses/slang used treats character attributes in
an additive way.  Until the first time the link is selected, see
PROBLEMS file etc.)  

For curses/ncurses, it may just all just be a question of what
terminfo/termcap entries you have for the terminal type?

PS I don't see as underlined what HTML.c calls UNDERLINE, and I don't see
   as bold what HTML.c calls BOLD, but that's beside the point.

  Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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