Dash XML
“ IT’S JUST TOO SIMPLE — LET’S TURN IT COMPLEX ”
This is one example about how Dash Markup can be used in practice.
Short proof of concept:
img - src res/dash-markup.svg - alt Poster:Dash --- Markup ---- -- br -- a - href //unseen-site.fun - target _blank - i -- Unseen-Site.Fun -- -
<img src="res/dash-markup.svg" alt="Poster:Dash - Markup --" /> <br /> <a href="//unseen-site.fun" target="_blank"> <i>Unseen-Site.Fun</i> </a>
With Dash Markup, your eyes & fingers will (hopefully) strain less on the syntax 😄
Basic Rules
-
The word before the first single dash is treated as an XML tag.
-
For words between single dashes,
- the first word is attribute name,
- and the rest are together as attribute value.
If plain dashes are desired between these words, type 2 more dashes in place.
-
For a Dash Markup line that ends with a single dash,
- if there is a tag, this line will become an open tag;
- if this is a bare single dash, this line will close the previous tag.
-
For a Dash Markup line that ends with a double dash,
- if there is another double dash in line, words and dashes after that will become content of the current XML tag, and the tag is closed afterwards;
- otherwise, the tag will close itself as a void element.
-
Special cases for tags:
-
If the “tag” is
!--
, this line will become XML comment (<!-- -->
) -
If this “tag” starts with
!
, it’s an Entity , closing will omit the slash. -
If this “tag” starts with
?
, it’s a Declaration , will close with?>
. -
Typically:
!-- Comment -- !doctype - html -- ?xml - version 1.0 - encoding UTF-8 - standalone no --
<!-- Comment --> <!doctype html> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-
Entity definition not supported intentionally due to complexity and security problems.
Realtime Demonstration
Try it in a Live Demo!