Hmm...  I'm just a hacker and I'm pretty new to CSS, but that makes sense.  I already tried replacing the line in NarrativeWeb.py that you suggested, and I like what I have seen of the result so far.  I will play around with both options and find something that works for me until you guys get the Formatted Notes feature figured out.  (THEN I will spend a few weeks deleting all my HTML tags... ugh!)
 
Thanks for all the help!
David


On 4/7/08, Benny Malengier <benny.malengier@gmail.com> wrote:


2008/4/7, Benny Malengier <benny.malengier@gmail.com>:


2008/4/7, David Martin <martin.d.r@gmail.com>:
A good example of my problem is shown in the differences between these two pages generated by v2.2.10 and v3.0.0 respectively:
 
Both are generated from the same note, where I enclosed the text of the will in <pre></pre> tags to maintain the spacing of the text.  I have done basically the same thing in hundreds of notes scattered throughout my database...
 
You will notice that v2 translated the line breaks within <pre> tags as <br>, and v3 translated the same line breaks as hard <p></p> (not a CSS thing), resulting in very large, ugly spacing that looks nothing like intended...

Not the above. In 3.0.0, a newline in the note is translated to <p></p>, not as <br>

Sorry, you said that .
 

This is line  629 in the NarrativeWeb.py file:
text = u"</p>\n\t\t<p>".join(text.split("\n"))

David, Brian, perhaps it is nicer to have only double enters in note translate to a paragraph, so something like
text = u"</p>\n\t\t<p>".join(text.split("\n\n"))
text = u"<br>\n\t\t".join(text.split("\n"))
instead? However, we would need to match with a regex first to change spaces, so "\n   \n" is replaced by "\n\n" first.

David, can you try that? It will probably solve things for you. The above line in version 2.2.10 used to be: text = u"<br>".join(text.split("\n"))
so using that on your pc will certainly make things back as before.

Jason, as the person who made the css, is there another way to influence linebreaks, paragraphs? What would your take be on translating a note with newlines to html code? Use <br>? Is it really needed to translate linebreaks as <p>, would two new lines not automatically give nice flowing text? Could we use a custom tag, like <notenewline> which the css then handles??

This makes me think, is it not possible to do define things like pre.p in css and have <p> in the <pre> behave differently? I remember some of those tricks from reading some webpage once ...

Benny