* nnslashdot paragraphs fix, please check
@ 1999-12-14 11:57 Per Abrahamsen
2000-04-21 18:00 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Per Abrahamsen @ 1999-12-14 11:57 UTC (permalink / raw)
Slashdot paragraphs often seem to consist of the sequence <BR>^M<BR>
as in the example below.
<TR><TD bgcolor=ffffff>I saw myself beginning to ramble. bear in mind i've gone a few days with little sleep and the finals beckon.\r<br>\r<br>perhaps here is a truncated 'point' :)\r<br>\r<br>given the dilemma as to whether ideas in and of themselves should be free, can you blame richard stallman for being so pro-free-software?\r<br>\r<br>uh, yeah, that's it :-)\r<br>im going to sleep now ...\r<br><BR>--
nnslahsdot turn <br><br> into <p>, but that doesn't work with the CR
inbetween. The following fix will allow any whitespace between the <br>'s.
Is this the right way to solve it? Please comment.
1999-12-14 Per Abrahamsen <abraham@dina.kvl.dk>
* nnslashdot.el (nnslashdot-request-article): Allow whitespace
between two `<br>' when translating into `<p>'.
Index: nnslashdot.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnslashdot.el,v
retrieving revision 5.39
diff -c -r5.39 nnslashdot.el
*** nnslashdot.el 1999/12/14 00:14:06 5.39
--- nnslashdot.el 1999/12/14 11:54:50
***************
*** 344,350 ****
(erase-buffer)
(insert contents)
(goto-char (point-min))
! (while (search-forward "<br><br>" nil t)
(replace-match "<p>" t t))
(goto-char (point-min))
(insert "Content-Type: text/html\nMIME-Version: 1.0\n")
--- 344,350 ----
(erase-buffer)
(insert contents)
(goto-char (point-min))
! (while (search-forward-regexp "<br>\\s-*<br>" nil t)
(replace-match "<p>" t t))
(goto-char (point-min))
(insert "Content-Type: text/html\nMIME-Version: 1.0\n")
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: nnslashdot paragraphs fix, please check
1999-12-14 11:57 nnslashdot paragraphs fix, please check Per Abrahamsen
@ 2000-04-21 18:00 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2000-04-21 18:00 UTC (permalink / raw)
Per Abrahamsen <abraham@dina.kvl.dk> writes:
> nnslahsdot turn <br><br> into <p>, but that doesn't work with the CR
> inbetween. The following fix will allow any whitespace between the <br>'s.
nnslashdot now translates all the <br>'s into <p>'s. I think that
makes Slashdot vaguely more readable, but there are some places that
<br> is actually what people were aiming for. It's not very common,
though.
The difference between many web pages and news articles is that web
pages often look like:
-------
This is a paragraph that goes like this
and ends here.
And a new paragraph starts here and continues
until it ends.
-------
While in news that would be:
-------
This is a paragraph that goes like this
and ends here.
And a new paragraph starts here and continues
until it ends.
-------
And webby people achieve the former by ending paragraphs with <br>.
A division between representation and presentation? What's that,
then?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-21 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-14 11:57 nnslashdot paragraphs fix, please check Per Abrahamsen
2000-04-21 18:00 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).