div & span support

David Aurelio d.aurelio at gmx.net
Mon Mar 5 03:13:14 EST 2007


Richard Taytor wrote:

> > [John Fraser:] Being able to wrap Markdown text in divs and spans ...

>

> I find div and span tags quite useful. Here is an example of the syntax I'm presently using.

>

> [[ {#orchard}

> Contents of div here. And ~this{.plum}~ is how I do spans.

> ]]


On [Markdown syntax], you can find the following statement:

> Markdown is intended to be as easy-to-read and easy-to-write as is

> feasible.

>

> Readability, however, is emphasized above all else. A

> Markdown-formatted document should be publishable as-is, as plain

> text, without looking like it’s been marked up with tags or formatting

> instructions.


I don't think that you suggestions increase the legibility of Markdown
for people that don't know HTML. I agree with John Fraser: divs and
spans might only be necessary for people who already know the concept.

I'd like to see that future enhancements to the syntax are not be a
simple mapping of possible HTML tags but rather concepts that might be
helpful for text writing.

Examples are

* Text anchors (sorry, I'm not sure whether this is the
approptiate english word) - it seems like this was your goal by
defining a div. In my opinion, the possibility to define header
ids in [Markdown Extra] is good, although the feature breaks as
soon as users define an invalid id (containing spaces or
symbols).

* Foreign words. I don't know if this would really be useful.
Foreign words could, for instance, be defined as follows:

> I have been to the [[de: Oktoberfest]] in Munich last year.

which would map to:
<span lang="de" xml:lang="de">Oktoberfest</span>

Ideally, [[es: *Paella*]] _and_ *[[es: Paella]]* would map to
<em lang="es" xml:lang="es">Paella</em>. Maybe it makes things more
complicated than necessary...

* Tables. This is a mapping to HTML elements, but also a concept
useful when writing certain types of text. The same applies to
definition lists.

- David Aurelio

[Markdown syntax]:
<http://daringfireball.net/projects/markdown/syntax#philosophy>
[Markdown Extra]: <http://www.michelf.com/projects/php-markdown/extra/>




More information about the Markdown-Discuss mailing list