These changes expand and rework the constructors for AST values proposed
in #252. The aim is to make construction of AST values relatively simple
and light weight.
The constructors lacked some ergonomic convenience, and we were missing
a constructor for headings and missing a way to construct elements that
included concatenated inlines (so, e.g., there was no way of constructing
a paragraph that would include mixing plain text with em or strong text.
I think this was mostly due to us having omitted tests that
would show how the constructors were meant to be used when we first
introduced them, so I'm adding in tests as I go so we can see how usage
will look, and spot any irregularities or oversights.
Followup to #268.
These changes expand and rework the constructors for AST values proposed in #252. The aim is to make construction of AST values relatively simple and light weight.
The constructors lacked some ergonomic convenience, and we were missing a constructor for headings and missing a way to construct elements that included concatenated inlines (so, e.g., there was no way of constructing a paragraph that would include mixing plain text with
em
orstrong
text.I think this was mostly due to us having omitted tests that would show how the constructors were meant to be used when we first introduced them, so I'm adding in tests as I go so we can see how usage will look, and spot any irregularities or oversights.