lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev clarification of indent problem


From: Klaus Weide
Subject: Re: lynx-dev clarification of indent problem
Date: Fri, 19 May 2000 20:38:26 -0500 (CDT)

On Fri, 19 May 2000 address@hidden wrote:

> The problem comes when I have a code sample that goes something
> like this::

>         <UL>
> <TABLE><TR><TD bgcolor=cccccc>

Slashdot generates horribly invalid HTML...  You only need to look at
those two lines to see it...

...and, apart from that, their use of heavily nested tables isn't exactly
what HTML tables are meant for.  Anyway...

> Which is really supposed to render to something like the following
> in almost any browser except lynx.
> 
> mmm - steak (Score:1)
>    by [49]bonzoesc (bonzo(NOSPAM)esc81(AT)hotmail.com) on Tuesday May 16,
>    @02:04PM EDT ([50]#1)
>    ([51]User Info) [52]http://www.geocities.com/lpibrycekerley/
>    Any way you order it, steak is always better than none, or CowboyNeal.
>    I think I will go buy one tonight. Vegetarians get lost!
> 
>    "Assume the worst about people, and you'll generally be correct"
>    -Scott Adams
>    [ [53]Reply to This | [54]Parent ]
>    Ah, but how much steak? 12 oz.? 16 oz.? 32 oz.? (Score:0)
>        by Anonymous Coward on Tuesday May 16, @02:55PM EDT ([55]#45)
>        Me, I like a 48 oz. steak. Yes, that's 3 pounds of steak. When I'm
>        really famished I can do 64 oz. And I like 'em really well done.
>        "Two steaks! Nuke 'em! I'll order". Yum
>        [ [56]Reply to This | [57]Parent ]

Not exactly.  But both 'links' and 'w3m' do seem to indent at least somewhat
in the way you expect.

And I managed to find an old lynx 2.5, which indeed appears to present a form
of incremental indentation.

> Now the content is irrevelent but the rendering dosn't do anything in the new 
> lynx
> 2.8.2. rel 1 ok not 2.8.3 but close enough.
> To get this to work properly I had to use 2.5FM with the following options
[ snipped ]
> My questions I guess boil down to two things
> 1. Why does the output of comments not work properly in the default
> config for the program in the new releases. 

I'm sure you know that lynx still doesn't support tables.  Or rather, it
has some (minimal) support, but not the full thing.

To achieve the progressive indentation effect, slashdot relies on (1) certain
browser behavior when faced with some kinds of invalid HTML nesting (here:
content in UL elements without intervening LI elements), and (2) on table
support.  (1) doesn't seem to be a problem with lynx (it happens to do
the expected thing, it seems).  Re (2), lynx's minimal table support has
changed since 2.5.  In 2.5, table markup was ignored to a higher degree.
That happens to preserve the current UL-level indentation for the text
within the TABLE, so that (in the case of slashdot) you get the desired
effect.  Later, this was changed; I thing the relevant change is (from
the CHANGES files)

1997-05-21
* Mods in HTML.c and LYCharUtils.c so that TABLE blocks are treated
  as divisions in the DIV nest, with a default alignment of HT_LEFT
  if the TABLE start tag lacks an ALIGN attribute, and otherwise,
  that attribute's value.  Nested TABLEs extend the DIV nest.  This
  avoids the problem in the vanilla code of TABLE content inheriting
  the alignment of a containing CENTER or DIV which is intended for
  alignment of the TABLE as a whole.  Also added support for ALIGN
  attributes in TR elements.  If the TR has no ALIGN attribute, it
  inherits that of the current division, which should be that of the
  current TABLE.  This, of course, still does not yield true TABLEs
  for truly tabular content, but makes TABLEs used for formatting
  more readable. - FM

This was possibly modified later by other changes, but essentially it
still describes the current behavior (for 2.8.3: before / unless TRST
gets a grab at realigning things - but that's not relevant here).

> The output that
> I get shows nothing in the way of proper indentation at all but just
> a long list of comments that you visually can't attach to anything
> 2. Is there a way to fix this to work the same way that other browsers render 
> it
> properly in nested mode.

a) You could use another browser (w3m, links, old lynx, ...) for
   those pages.  Even set up (current) lynx to switch to that other
   browser, if you like, perhaps with '.' (EXTERNAL).
b) Offer your help to implement fuller table support in lynx.
c) Ask slashdot to abuse tables less for formatting (or at least,
   format stuff more in a way that tables are not necessary for
   making sense of the flow of messages).
d) Make a patch that lets lynx optionally revert to the 2.5 behavior
   (the most special and narrow "solution", since, as far as we know
   so far, it helps only with 1 site).

> I also find it interesting that this could be fouling up in a new product 
> compared to an old one.

Obviously, the author of that change (FM) thought that it improved
lynx's rendering, in at least some pages.  It just happens to not
be the case for slashdot's particular (ab)use of HTML.

The best long-term solution would be full(er) table support by lynx.

> If anyone is interested in the code I got it's from the recent poll
> at http://www.slashdot.org and the first comment and the first
> response to the first comment.

Not very useful as a location.  The content changes by the minute and
may depend on preferences and so on.  It was different from your
snipped when I looked.


   Klaus


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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