Thanks for your reply, Hampton.
I agree that the syntax I proposed could be confusing. I also
considered letting the substitution pairs be written in YAML format,
indented after the substituted line. However that would break the
convention of "content cannot be both given on the same line and
nested within it" in HAML. On the other hand, without indentation, the
substitution pairs could be confused as plain text.
However I think the substitution approach is good, because it allows
all of HAML's syntactic goodness to be used for the inline elements.
It occurred to me that this feature does not necessarily require
modifying HAML. It can be implemented as a filter, for example:
:substitute
%p {Please} {contact us} for any questions!
---
Please: %em Please
contact us: %a(href="contact") contact us
Basically everything before --- is HAML, with place-holders enclosed
in braces. Everything from --- is YAML, defining a mapping between
place holder names and their substitutions in HAML. When a place-
holder is not defined, I think it should be left as-is, including the
braces, so there is no need to escape them most of the time.
Yaohan Chen
> >
haml+uns...@googlegroups.com <
haml%2Bunsu...@googlegroups.com>.