Closed ibrahima closed 6 years ago
Wrote up some specs, and a possible fix, in #114
Let me know if that seems good! Unfortunately javascript doesn't have a horizontal whitespace character class so I had to use this trick: https://stackoverflow.com/a/3469155/90551 . Maybe there's a better way though?
This should be fixed now; I also added a regression test for the case: 147a84afe0ca9c823fe281663c9d0e276b033df7
I think there's some kind of issue with interpolation/substitution with the source tag - for instance, if I do something like
where baz contains newlines, the result will have all the newlines within baz doubled:
but I would have expected
This only happens if the interpolation is preceded by a newline.
Interestingly, if I do something like
the newlines actually get turned into spaces, which is also not what I would have expected.
I think it has something to do with the fact that source blocks attempt to match the outer indentation level when you interpolate a variable? I.e.,
becomes