lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev <BR> does not accumulate


From: David Henderson
Subject: Re: lynx-dev <BR> does not accumulate
Date: Wed, 12 Aug 1998 19:29:44 -0500 (CDT)

My take on the <BR> situation is that, while it's a good idea on paper,
collapsing multiple <BR>s into one is a problem in the Real World.

There are many BBS/Forum/Discussion Area places on the web that people
enter their text in a TEXTAREA, and then the CGI backend translates every
%0d%0a (or ^M, or however you prefer to call it) into a <BR>.  Few boards
are smart enough to translate two adjacent %0d%0a's (or ^M's, or whatever)
into a <P> instead of a <BR>.

This makes using a Lynx that collapses <BR>s a real pain to read messages
on such boards, because there are no paragraph breaks where people typed
them in.  That's why I most often use an old copy of Lynx 2.6 to read
those boards.

However, there may be a solution to the problem that would
(A) eliminate the very long breaks that are occasionally found in pages
    written for graphical browsers for spacing (usually in tables to line
    things up), and
(B) let people use multiple <BR>s to separate paragraphs.

That would be to use a collapsing code similar to <P>.  Essentially, the
flow would go something like this (using pseudocode):

  if tag is <BR>
  {
    if we're in the middle of a line
    {
      end line, go to start of next
    }
    else we're at the beginning of a blank line
    {
      if the line above has something in it
      {
        go to the start of the next line, leaving a single blank line
      }
      otherwise it's blank
      {
        do nothing, so we're still left with a single blank line
      }
    }
  }

That way, <P>Line 1<BR>Line 2</P> would render:

>  Line 1
>  Line 2

And <P>Line 1<BR>Line 2<BR><BR>Paragraph 2, Line 1</P> would render:

>  Line 1
>  Line 2
>
>  Paragraph 2, Line 1

And <P>Line 1<BR>Line 2<BR><BR><BR><BR><BR><BR>Paragraph 2 after big
space</P> would render:

>  Line 1
>  Line 2
>
>  Paragraph 2 after big space

How difficult would this be to code?  I haven't a clue.  But since
something similar (but different) exists for collapsing <P>'s together,
I can't imagine that it should be too hard.

David Henderson
--
Star Trek?  Psi Phi!  Visit http://www.psiphi.org/ for the latest news
and rumors about "Star Trek: Deep Space Nine" and "Star Trek: Voyager"
----------------------------------------------------------------------
<*> davidh at psiphi.org, davidh at imsa.edu, davidh at cyberdesic.com

reply via email to

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