2008/4/7, Benny Malengier <email@example.com>:
2008/4/7, David Martin <firstname.lastname@example.org>: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 ...