Gnus development mailing list
 help / color / mirror / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: nnslashdot paragraphs fix, please check
Date: 14 Dec 1999 12:57:42 +0100	[thread overview]
Message-ID: <rjzovdenux.fsf@zuse.dina.kvl.dk> (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")


             reply	other threads:[~1999-12-14 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-14 11:57 Per Abrahamsen [this message]
2000-04-21 18:00 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rjzovdenux.fsf@zuse.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).