specdown icon indicating copy to clipboard operation
specdown copied to clipboard

No way to make a result with an no trailing newline pass the diff

Open PurpleBooth opened this issue 5 years ago • 2 comments

You get something like this

< left / > right
 +-----------------------------------+---------+
 | Lint                              | Status  |
 +=============================================+
 | duplicated-trailers               | enabled |
 |-----------------------------------+---------|
 | subject-not-separated-from-body   | enabled |
 |-----------------------------------+---------|
 | subject-longer-than-72-characters | enabled |
 |-----------------------------------+---------|
 | body-wider-than-72-characters     | enabled |
 +-----------------------------------+---------+
<

Which isn't representable with the code block

PurpleBooth avatar Jul 05 '20 08:07 PurpleBooth

What do you think the logic would be for this? Strip all trailing newlines? Strip one trailing newline? Maybe an optional setting to ignore trailing whitespace (wondering if some times you do care?).

tomphp avatar Jul 05 '20 09:07 tomphp

I'm not really sure, this was actually a bug in my app, but if I was testing

echo -n "."

It wouldn't be. Probably the way it is now is the default with some special behaviour for commands without trailing newlines

PurpleBooth avatar Jul 05 '20 09:07 PurpleBooth