Closed c0nst4ntin closed 1 year ago
Do you see any problem with the change or the updated tests @gsteel?
I'd say this is good to be merged and released in v5.2.1
@gsteel Anything else to add?
The patch is fine now, but I struggle to see why the trailing \n is a problem in the first place. One of the problems of mixing formatting and output with these value objects is that you'll always have to be tweaking them to satisfy someones preference as to what the output should be. Standalone serializers are much easier to reason about and test and of course much more easily replaced.
This PR aims to solve Issue #152
As mentioned by @cloakedninjas it does not make sense to have a trailing
\n
on the last block inRichText::asText()
.I implemented a solution like the one mentioned in the issue and updated and extended the Tests for the
asText
function.