Closed afranke closed 6 years ago
Using Fprint
instead of Fprintln
in the push event handler should fix it. I'll see if I have some time to fix this and the other easy issues some time soon.
Awesome, thanks a lot!
The situation is a lot better, but there is still an extra \n at the end of the commit list because of the \n
after the </li>
in https://github.com/maubot/gitlab/blob/master/gitlab-webhook.go#L111
Removing that would very likely make the plaintext fallback much worse. Besides, ignoring newlines isn't something Riot does, newlines in HTML are ignored unless they're in a preformatted block
Anyway, I'm going to rewrite the bot to use the maubot platform soon, which uses Markdown for formatted messages and a more advanced plaintext fallback generator, so this will probably get fixed then.
Commit notifications look like
with unneeded
\n
before and after. Riot trims them but one shouldn’t rely on that behaviour. Please remove them.