Re: Syntax Questions

2008-07-22 Thread Michel Fortin

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:


function a() {
return 1;
}

be turned into this:

function a() {
return 1;
}

effectively doubling the newlines?


Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/


___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-22 Thread Jurgens du Toit
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 <[EMAIL PROTECTED]>
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:
>
>function a() {
>return 1;
>}
>
> be turned into this:
>
>function a() {
>return 1;
>}
>
> effectively doubling the newlines?
>
>
>
> Michel Fortin
> [EMAIL PROTECTED]
> http://michelf.com/
>
>
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@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
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-22 Thread Aristotle Pagaltzis
* Michel Fortin <[EMAIL PROTECTED]> [2008-07-22 12:40]:
> Have you considered what will happen to code blocks with
> `nl2br`?

That can be fixed by *replacing* newlines with break tags so
there aren’t any literal linebreaks. View Source won’t be pretty
but the browser rendering will be correct.

Regards,
-- 
Aristotle Pagaltzis // 
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Syntax Questions

2008-07-22 Thread John MacFarlane
You can change [peg-markdown] to behave the way you want (without
problems in code blocks) just by adding one line:

--- a/markdown_parser.leg
+++ b/markdown_parser.leg
@@ -384,6 +384,7 @@ Entity =( HexEntity | DecEntity | CharEntity )
 { $$ = mk_str(yytext); $$->key = HTML; }
 
 Endline =   TerminalEndline | NormalEndline
+{ $$ = mk_element(LINEBREAK); }
 

[peg-markdown]: http://github.com/jgm/peg-markdown/tree/master

John

+++ Jurgens du Toit [Jul 22 08 12:43 ]:
>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
><[EMAIL PROTECTED]> 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:
> 
> function a() {
> return 1;
> }
> 
>  be turned into this:
> 
> function a() {
> return 1;
> }
> 
>  effectively doubling the newlines?
> 
>  Michel Fortin
>  [EMAIL PROTECTED]
>  [3]http://michelf.com/
> 
>  ___
>  Markdown-Discuss mailing list
>  [EMAIL PROTECTED]
>  [5]http://six.pairlist.net/mailman/listinfo/markdown-discuss
> 
>--
>Jurgens du Toit
>Cell: +27 83 511 7932
>Fax: +27 86 503 2637
>Website: [6]www.jrgns.net
> 
>If people never did silly things, nothing intelligent would ever get done.
>- Ludwig Wittgenstein
> 
> References
> 
>Visible links
>1. mailto:[EMAIL PROTECTED]
>2. mailto:[EMAIL PROTECTED]
>3. http://michelf.com/
>4. mailto:Markdown-Discuss@six.pairlist.net
>5. http://six.pairlist.net/mailman/listinfo/markdown-discuss
>6. http://www.jrgns.net/

> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss

___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


standard-izing extended markdown

2008-07-22 Thread Gour
Hello!

On the markdown site it is written: "Markdown’s syntax is intended for
one purpose: to be used as a format for writing for the web.", although
recently I moved from Emacs Muse to Markdown markup for writing my study
notes and plan to use it for writing technical documentation as well.

However, in order to be able to use the features I had in Muse, I write
using 'extended' syntax and use Pandoc to convert my study notes to
*.odt (and to *.doc to my mentor), while I plan to convert markdown to
ConTeXt for my own publishing needs.

Pandoc will get bibliographic citations support and it already has
support for stuff like footnotes, tables, and definition lists.

That's why I'm interested to know what is the plan in regard to
standardizing some of those 'extra' features which put markdown markup
in the category of (more) serious authoring solutions?

I appreciate the simplicity of markdown, but still consider that the
above features do not taint the basic model, but provide powerful
authoring solution along with converters like Pandoc which does
LaTeX/ConTeXt/...


Sincerely,
Gour


-- 

Gour  | Zagreb, Croatia  | GPG key: C6E7162D



pgpxFxHFn4Yen.pgp
Description: PGP signature
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss