Syntax Questions

Jurgens du Toit jurgens.dutoit at gmail.com
Tue Jul 22 06:43:35 EDT 2008


Mmm, yes. Didn't think about that. Another solution would perhaps be to
split the string into an array by using the start and end tags of block
elements, and then only nl2br specific elements of this array, and then put
the string back together again.

J

On Tue, Jul 22, 2008 at 12:35 PM, Michel Fortin <michel.fortin at michelf.com>
wrote:


> Le 2008-07-22 à 2:47, Jurgens du Toit a écrit :

>

> At the end of the day I probably will maintain my own copy, with some

>> changes, of Markdown. I also don't want to break the syntax. One of my

>> previous mails I mentioned a way that makes the Markdown more useable (by

>> being able to usefully use nl2br on the Markdown'ed string) without

>> breaking

>> the syntax or HTML and plain text presentation.

>>

>

> Have you considered what will happen to code blocks with `nl2br`? Won't

> this:

>

> <pre><code>function a() {

> return 1;

> }</code></pre>

>

> be turned into this:

>

> <pre><code>function a() {<br />

> return 1;<br />

> }</code></pre>

>

> effectively doubling the newlines?

>

>

>

> Michel Fortin

> michel.fortin at michelf.com

> http://michelf.com/

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>




--
Jurgens du Toit
Cell: +27 83 511 7932
Fax: +27 86 503 2637
Website: www.jrgns.net

If people never did silly things, nothing intelligent would ever get done.
- Ludwig Wittgenstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20080722/6dd27e45/attachment.htm>


More information about the Markdown-Discuss mailing list