Skip to content

Double linebreak on XMPP replaced by 1 linebreak and 1 space #1196

@zaughon

Description

@zaughon

In order to let us help you better, please fill out the following fields as best you can:

I am...

  • Reporting a bug
  • Suggesting a new feature
  • Requesting help with running my bot
  • Requesting help writing plugins
  • Here about something else

I am running...

  • Errbot version: 5.1.3
  • OS version: Ubuntu 14.04 LTS
  • Python version: 3.4.3
  • Using a virtual environment: yes
  • Backend: XMPP

Issue description

When i send a message with te\n\nst it does 1 linebreak and 1 space, instead of 2 linebreaks

E.g.:

    @botcmd()
    def test(self, msg, args):
        return "Te\n\nst"

returns:

Te
 st

instead of:

Te

st

I tried escaping it, using "```\nte\n\nst```\n", but that just returns:

\```
te
 st```

(but without the \ those were to prevent markdown from interpreting it here)
Still with the 1 linebreak, and then a space.

Steps to reproduce

  1. Set up a bot using XMPP-backend.
  2. Create the following command:
    @botcmd()
    def test(self, msg, args):
        return "Te\n\nst"
  1. Use the command.

Result:
It will ignore the double line-break, and do 1 line-break, and 1 space.

Additional info

The same issue happens when using errbot templating. If you have a longer template, you can only do 1 line break, then it just start adding spaces instead, meaning everything looks extremely clumped together, as you can't really create paragraphs.

Not sure if this is related to the information/errors i posted in this comment:
#1148 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions