...would assign all whitespace between the two dimensions to the suffix of the first dimension.
It's slightly more accurate to assign the newlines to the suffix of the first dimension and the non-breaking whitespace characters (spaces) to the prefix of the second dimension.
This is useful for a case where we want to dump the second dimension in isolation to a string. In the current version of the code, we lose the leading whitespace, so we get this:
dimension: d2 {
...
}
Note that the word dimension and the closing } are not aligned.
After this change, we get:
dimension: d2 {
...
}
Which is much more consistent and easier to strip the leading indent off of.
Support
interval_trigger
Closes #78.
Reassign block prefix whitespace
Previously, parsing text like this...
...would assign all whitespace between the two dimensions to the suffix of the first dimension.
It's slightly more accurate to assign the newlines to the suffix of the first dimension and the non-breaking whitespace characters (spaces) to the prefix of the second dimension.
This is useful for a case where we want to dump the second dimension in isolation to a string. In the current version of the code, we lose the leading whitespace, so we get this:
Note that the word
dimension
and the closing}
are not aligned.After this change, we get:
Which is much more consistent and easier to strip the leading indent off of.