Open lcnbr opened 2 years ago
For an abbr with a title,I think a natural syntax would be
[HTML]{abbr="HyperText Markup Language"}
For an abbr without title, I'd love to write
[HTML]{abbr}
the problem with that is that we don't allow bare attributes, so that has to be {.abbr}
.
Which raises the question: why do we need .attr
syntax at all? Perhaps we should remove the dot and use [key1 key2=val key3]
syntax instead?
We already remove the dot in one place:
::: attr
:::
Two possible reasons:
.
makes it less likely that someone will trigger attribute syntax inadvertently.class
is the CSS syntax, and it makes sense to follow it.="true"
(unlike XHTML) — so any change should probably be in that direction.requiring the . makes it less likely that someone will trigger attribute syntax inadvertently
One thing I didn't realize is that attributes can apply directly to words: HTLM{.abbr}
, HTML{}
. An alternative is to require an explicit span (using any kind of delimiters), so that attribute syntax requires two pairs of delims, which perhaps is protection enough from accidents.
Looking at #65 and especially at #66 makes me feel that word{.attr}
syntax is problematic -- it's difficult to know what the word is without unicode tables.
.class is the CSS syntax, and it makes sense to follow it.
In CSS selectors, both foo bar
and foo .bar
are possible. The .
is there to distinguish between class selectors and tag selectors. Requiring .foo
without foo
also having a meaning feels odd.
It would be great to have a nice syntax for acronyms (abbr in HTML) and glossary entries. I am not aware of any markdown flavor that handles this.
Maybe this ties into a more robust cross-referencing syntax..