Backslash escapes

Andrea Censi andrea at censi.org
Tue Jan 9 09:57:02 EST 2007


On 1/8/07, Jacob Rus <jrus at hcs.harvard.edu> wrote:

> > So I guess the problem is: how do I tell Textmate to highlight that? :-)

> Well, that one is super simple.


Thanks!



> > Maruku will implement the [new meta-data proposal][4], once it is

> > stabilized with discussion on this mailing list. Also PHP Markdown

> > will implement something similar. The new syntax uses curly quotes.

>

> I really don't like this metadata proposal at all, since it ties

> markdown down completely to html, which is in my opinion a terrible

> design choice.


The new meta data syntax does *not* tie Markdown to HTML. It just lets
generic attributes be attached to elements. Then, these attributes can
be used for anything.

In fact, in Maruku it is used for all sort of things both for HTML and
LaTeX output.

For example:
- The id attribute: `{#id1}` (short for `{id=id1}`) is used for
cross-references inside the same document. If you write:

### Header ### {#id1}

Here's [a link to the header](#id1)

the link will be usable both for LaTeX and HTML.

- The `lang` attribute is used for syntax highlighting, in both LaTeX
and HTML. Example:

<div>html</div>
{lang=html}



> Also, I thought it was kinda ugly.


De gustibus...


> > If Multimarkdown's syntax for tables is better specified, I'll

> > implement it for Maruku too. ....

> No, don't do that. There were several other table proposals,...


The current table support in PHP Markdown, Maruku, and MultiMarkdown
seems reasonable to me for basic tables.

I am not too concerned with complex tables, but if some discussion is
done and consensus is reached about a more powerful syntax, I'll
implement it.


> > [Pandoc][5] and [Multimarkdown][6] implement inline math.

> Yes, but I don't really like the way that they convert markdown to TeX

> in general, which is to basically layer some xslt on top of the existing

> regexp-ish heuristics.


That's true only for MultiMarkDown.
Pandoc and Maruku have proper parsers, and they output clean LaTeX.

XSLT? the horror, the horror!


> >> 3. A more formalized extension mechanism


So the rule you are proposing is:
- curly brace {
- target [^\s]+ $ = math, : = meta, etc..
- content [^}]*
- curly brace }

That's reasonable.

So suppose this code:

{lily a b c d}

What should the default action for an interpreter that does not know
the extension "lily" be?

1) ignore it, and strips from the output
2) ignore it, and leave it in the output as is
3a) threat it as code = `a b c d`
3b) threat it as code = `lily a b c d`


> Anyway, in the future, if markdown gets a real parser,


Please distinguish between the Mardkwon syntax and its implementations.
As I said, Pandoc and Maruku have real parsers.

--
Andrea Censi
"Life is too important to be taken seriously" (Oscar Wilde)
Web: http://www.dis.uniroma1.it/~censi


More information about the Markdown-Discuss mailing list