Archived Comments (locked)

in
Subscribe to Archived Comments 8 posts, 4 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Jonatron Scriptwright

@avg

Line breaks are not the same thing as paragraphs. Usually you want paragraphs.

 
Jonatron Scriptwright

This looks like the same thing: http://userscripts.org/scripts/show/34577

 
Avindra V.G. Scriptwright

why not

  text.value = text.value.replace(/(\n{2,})/g,"<br/>");

by the description, that's exactly what you want
:D

 
Jonatron Scriptwright

This should work on forums, too.

 
Jonatron Scriptwright

I'm not a javascript master, but I fixed it by changing to this:

  text.value = '<p>' + text.value
  text.value = text.value.replace(/(\n+)/g,'</p><p>$1');
  text.value = text.value + '</p>'

 
Jonatron Scriptwright

The first paragraph should get a tag, too.

 
Cornelius Scriptwright

This is great. The site has a mind-bogglingly odd engine for handling journaling, and runon comments are very hard to read. This script restores readability which the author put in but OKCupid would want to strip out.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel