Open dz4k opened 10 months ago
Many Markdown implementations support this syntax (...)
References?
@Omikhleia
You'd save two characters of typing, at the cost of a new construct, less uniformity, and more complex parsing. Not sure it's worth it.
Yeah, I use []{.dfn}
syntax for my blog, and it works quite OK.
You'd save two characters of typing
I would say that another aspect here is the position of dfn
: if "tag name" comes first, its a bit more natural for this use-case. The distinction between "tag name" and "attribute" is very fuzzy of course, but I do feel certain friction in practice here. Leading tag would also be a bit more autocompletion / snippet friendly.
I actually came to this comment here to concur with "not needed", but now I am thinking, wouldn't it be cool if both of these:
inline :kbd[ctrl+c]
::: details
block
:::
produced a <kbd></kbd>
/ <details></details>
in the HTML output without any custom readers/writers? See also https://github.com/jgm/djot/issues/146.
@matklad Regarding your new idea above, I am not sure what it would then mean for non-HTML renderers...
Also, the implication now is the :em[doe]
would give <em>doe</em>
-- isn't it just reinventing a syntax for HTML? :cat2:
Fleshed out the idea in significantly more detail in
https://github.com/jgm/djot/issues/240
Also, the implication now is the :em[doe] would give doe -- isn't it just reinventing a syntax for HTML?
Yup, that's the point. The XML model with tag-name,attributes,children is great for markup, and a lot of formats support that (DocBook XML, SILE XML, LaTeX environments). If the target format doesn't have a direct support for tag names, it could be rendered exactly as it is today, as a class.
The XML model with tag-name,attributes,children is great for markup
But what this does it have to do with Djot markup then? Honestly I am lost now :)
Many Markdown implementations support this syntax:
which would presumably be transformed by a filter into an HTML
<dfn>
element.The current syntax for such a thing would be
which is more verbose.
I think this should be supported for links as well: