Re: Syntax for extensions

2008-02-15 Thread Aristotle Pagaltzis
* Florian Lindner [EMAIL PROTECTED] [2008-02-13 20:35]:
 Is there any special syntax that should be used for such 3rd
 party extensions? How would you do it?

I’ve found that if you don’t mind a somewhat nasty-looking
syntax, plain links are a nice extension point that can be used
for simple functionality without adding any new syntax to
Markdown. F.ex. to support abbreviations, I invented an `abbr:`
link scheme, so that I could write

[RDF](abbr: Reality Distortion Field)

which Markdown would then translate to

a href=abbr: title=Reality Distortion FieldRDF/a

which a trivial bit of XSLT would turn into

abbr title=Reality Distortion FieldRDF/abbr

Pretty? Not at all… but it worked, it was completely independent
of Markdown as such, and also completely independent of any one
particular Markdown implementation.

In your particular use, the use of the URI would not even be a
hack the way it was for mine. Just write your image tags
something like so:

![foo](replace:foo.jpg)

and then use script to replace any `img src` URIs in the output
that have the `replace:` scheme with whatever post-determined URI
is appropriate.

You don’t need to meddle with Markdown at all.

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


Re: Flat code block syntax

2008-02-15 Thread Trent Mick
 You get the idea. This mostly becomes a problem when writing technical
 docs with frequent chunks of embedded code, and the solution would
 appear to be to have different markup for begin-block and end-block.
 This is the approach that the Trac wiki syntax takes, using

 {{{
 chunk of code here
 }}}


This is also the approach of the Google Code wiki syntax. As well, the
language for language-specific syntax highlighting can be specified
via:

Python}
print hello world
}}}

Just a data point. I missed the earlier part of this discussion.

Cheers,
Trent

-- 
Trent Mick
[EMAIL PROTECTED]
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss