dcwatson / bbcode

A pure python bbcode parser and formatter.
BSD 2-Clause "Simplified" License
68 stars 17 forks source link

double line returns #1

Closed zauberparacelsus closed 11 years ago

zauberparacelsus commented 11 years ago

This module has a tendency to convert each line return into a double line break. I don't know if this is a part of bbcode's standard, but it's rather annoying because I like to keep careful control over my formatting.

As far as I can tell, there's no way to disable this behavior aside from running python's replace() function on the render_html() function's output.

dcwatson commented 11 years ago

Can you give me an example of some markup and how you'd expect it to be formatted differently? Or even better, a failing test case?

zauberparacelsus commented 11 years ago

Aye, I've got two cases, taken from the Comment section of my comic's test config files:

http://pastebin.com/Xr71sFEy http://pastebin.com/tygm78tj

In the first example, there are extra blank lines between the end of the list and the sentence following it. In the second example, there are at least two blank lines between each paragraph, whereas I had only desired one blank line between each paragraph.

zauberparacelsus commented 11 years ago

Oh, never mind. It was a problem with my parser that was reading in the configuration files for comic episodes. I had (incorrectly) assumed that the line feed character ("\n") was getting stripped when reading files line-by-line.