drone-plugins / drone-slack

Drone plugin for sending Slack notifications
http://plugins.drone.io/drone-plugins/drone-slack
Apache License 2.0
61 stars 80 forks source link

render template without trim #101

Closed henriblancke closed 4 years ago

henriblancke commented 4 years ago

Potential solution for https://github.com/drone-plugins/drone-slack/issues/30? It would help create cleaner slack templates without redundant line breaks.

tboerger commented 4 years ago

Not really... Trim just removes surrounding line breaks which is totally fine, it doesn't remove new lines within the content.

henriblancke commented 4 years ago

@tboerger gotcha! Looked closer at drone-template-lib now and indeed that is not what we need... I've updated the PR with a fix that should propagate the new lines to slack now. It works for me locally but please test and let me know if you run into any issues!

tboerger commented 4 years ago

If the parser doesn't provide proper new lines that sounds like an upstream issue. /cc @bradrydzewski

bradrydzewski commented 4 years ago

agreed, any change to the trim function needs to be made upstream to drone-template-lib.