Why do you want the newline at all? If you have \n\n in your text, it will be used to brak <p>...</p>. You can just add space after </p> with css.
On Thursday, 29 November 2012 10:27:12 UTC-6, Dirk Krause wrote: > > I see, and thank you. Now we already have a database full of text without > the 'newline' tag and I have two options: > (1) traverse through the database and applying foresaid regex to all text > fields or > (2) hack the regex somewhere into the code. > > I just tried (2) and it seems to be working; I applied this: > {{=MARKMIN(re.sub(r'([^\n])\n([^\n])', r'\1[[NEWLINE]]\n\2', theText))}} > and it seems to be working. > > So that's ok now, but when I do a CSV export it's not in so I my guess is > I need to change the MARKMIN renderer itself, right? > > > Am Donnerstag, 29. November 2012 16:27:19 UTC+1 schrieb Massimo Di Pierro: >> >> The idea was to insert explicit newlines inside tags like H1, H2, etc. >> >> On Thursday, 29 November 2012 08:52:24 UTC-6, Dirk Krause wrote: >>> >>> ok, thank you. >>> >>> I am only wondering why there is a special tag '[[NEWLINE]] when there >>> is already a one-to-one token for it - the single page break itself. >>> This can be parsed with >>> re.sub(r'([^\n])\n([^\n])', r'\1[[NEWLINE]]\n\2', s) >>> (full example here: http://pythonfiddle.com/replace-single-line-break ) >>> >>> Where would I put this regular expression best to avoid the newline tag >>> for the editor? >>> >>> Thanks again. >>> >>> Am Donnerstag, 29. November 2012 13:13:54 UTC+1 schrieb villas: >>>> >>>> Use this: >>>> >>>> [[NEWLINE]] >>>> >>>> On Thursday, November 29, 2012 11:04:56 AM UTC, Dirk Krause wrote: >>>>> >>>>> Hi, >>>>> >>>>> sorry if this was answered elsewhere but I couldn't find it: >>>>> I found no consistent answer how to add single line breaks ('<br />') >>>>> as opposed to paragraphs ('<p>') into MARKMIN. >>>>> >>>>> This is what I found so far: >>>>> (1) the 'purest' Markdown doesn't allow line breaks at all (found in >>>>> stackoverflow) >>>>> (2) there is a common practice to add two or more spaces at the end of >>>>> the line to inject a <br /> (see http://goo.gl/iEGU). >>>>> (3) then there is github flavored markdown ( >>>>> http://github.github.com/github-flavored-markdown/ ) which simply >>>>> adds this to the renderer. >>>>> >>>>> Obviously the MARKMIN renderer doesn't support (3). From some forum >>>>> posts I thought it would support (2) but it doesn't (I checked on >>>>> version 2.0.9). >>>>> >>>>> What is the best practice to achieve single line breaks? >>>>> >>>>> Thanks, >>>>> Dirk >>>>> >>>>> >>>>> --