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
>>>
>>>
>>>

-- 



Reply via email to