If code was contained in a nested child (such as when processing markdown) we would previously aggressively .trim() the output. Since there can be intentional leading/trailing space in a markdown code block (e.g. for indentation) this is probably too aggressive.
If code was contained in a nested child (such as when processing markdown) we would previously aggressively
.trim()
the output. Since there can be intentional leading/trailing space in a markdown code block (e.g. for indentation) this is probably too aggressive.Instead, we now just strip all trailing newlines.
Fixes https://github.com/code-hike/bright/issues/23