How to render without using HTML tags?
It would be nice if Markdown could address classes, IDs and properties directly. Something like this:
... [chili pepper]{.hot} ... by class
... [chili pepper]{#hot} ... by ID
... [chili pepper]{{color: red; font-weight: bolder;}} ... by direct style specs
producing:
... <span class="hot">chili pepper</span> ... by class
... <span id="hot">chili pepper</span> ... by ID
... <span style="color: red; font-weight: bolder;">chili pepper</span> ... by direct style specs
This syntax was inspired by PHP Markdown Extra.
It would be even nicer if modifiers could be combined in one expression:
... [chili pepper]{.hot .boxed #lot20137 {font-variant: small-caps;}} ... by enumeration
to be interpreted as:
... [[[[chili pepper]{{font-variant: small-caps;}}]{#lot20137}]{.boxed}]{.hot} ... by enumeration
thus giving nested span
elements:
... <span class="hot"><span class="boxed"><span id="lot20137"><span style="font-variant: small-caps;">chili pepper</span></span></span></span> ... by enumeration
Something for a new plug-in?
For the time being I use false tags to work around the verbose span
tags:
... <hot->chili pepper</hot-> ... by false tags
in combination with the CSS rule:
hot- { color: red; font-weight: bolder; }
I don’t expect the W3C Police will knock on my door for this, but somehow it feels as an improper use of HTML tags. And I still have to express twice that I want to have it hot, once at the beginning and once at the end of the phrase.