Closed mbutterick closed 8 years ago
(PS Obviously stripping the attributes afterwards is simple. This issue should not be mistaken for anything serious.)
It's a good question. I have mixed feelings about xexpr attributes being optional. That's convenient when typing xexprs by hand. OTOH when consuming xexprs, it's more convenient if they're always normalized to include an attribute list. A client of this package doesn't need to handle them being optional. So I think the status quo is a plus?
Fair enough. For Pollen I considered both options. I ended up going the opposite way (= no empty attr lists) because most tags don't have attributes, and the annoyance (to humans) of the extra housekeeping seemed to outweigh the benefits (to machines) of having them. Still, truly minor.
The
xexpr-drop-empty-attributes
parameter inxml/xexpr
controls whether empty attribute lists are omitted from X-expressions.parse-markdown
makes X-expressions, but does not observe this parameter. Can it? Should it?