Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown support #22

Open
sokratisg opened this issue Aug 8, 2017 · 10 comments
Open

markdown support #22

sokratisg opened this issue Aug 8, 2017 · 10 comments
Labels
Milestone

Comments

@sokratisg
Copy link
Contributor

First of all thank you very much for all the hard work in this backend.

Trying to hook Errbot on our internal Mattermost instance but it seems that every response/return of the bot is wrapped within noformat blocks (```). Believe that wrapping happens here: https://github.com/Vaelor/errbot-mattermost-backend/blob/master/mattermost.py#L446-L476

That noformat wrapping prevents the use of Markdown in bot's responses and that is one of the best features of Mattermost (and Slack ofc). Is there any workaround or special option we should enable as to have Markdown supported or is it something completely out of the question for this project?

@Vaelor Vaelor closed this as completed in 90a50b6 Aug 8, 2017
@Vaelor
Copy link
Collaborator

Vaelor commented Aug 8, 2017

Sorry!
This was me, trying to fix #8
I broke markdown in the commit.
So I guess I have to revisit this message splitting again.. Have been avoiding it a bit, to be honest.
This new commit should fix the markdown support - but splitting of long messages (log tail) will be broken again. But markdown is more important IMHO.

So updating the backend should do the trick :)

@Vaelor Vaelor added the bug label Aug 8, 2017
@sokratisg
Copy link
Contributor Author

Thank you very much!

@sokratisg
Copy link
Contributor Author

Also, MD is broken when you enable GROUPCHAT_NICK_PREFIXED = True in Errbot's config.py.

@Vaelor
Copy link
Collaborator

Vaelor commented Aug 8, 2017

Oh, Thanks. I will have a look at that!

@Vaelor Vaelor reopened this Aug 8, 2017
@Vaelor
Copy link
Collaborator

Vaelor commented Aug 8, 2017

@sokratisg It works fine in my case, with GROUPCHAT_NICK_PREFIXED = True.
Is the message very long, and split up in multiple parts?
Any special plugin which generates the markdown?

Running !render test worked fine in a group channel.

example

@sokratisg
Copy link
Contributor Author

sokratisg commented Aug 8, 2017

Try rendering a MD Table.
e.g:

| test title | test title |
| :--- | :---: |
| l1c1 | l1c2 |
| l2c2 | l2c2 |

@Vaelor
Copy link
Collaborator

Vaelor commented Aug 8, 2017

Ah yes. Testing !whoami which only renders a table, is definitly broken.
Modifying the output, putting two newlines in between the name/table works.

I am on it, not sure if it is an issue with the backend or mattermost because it does not render markdown if it is not on a new and empty line or who knows what :)

@Vaelor Vaelor added this to the 1.1.0 milestone Aug 14, 2017
@dijit
Copy link

dijit commented Mar 14, 2018

FWIW this seems to work for me on latest.
2018-03-14-010928_775x949_scrot

@Vaelor
Copy link
Collaborator

Vaelor commented Mar 14, 2018

@dijit does !whoami also renders correctly?

(Shit has it been 7 months that I said I'm on it? Damn it, days are too short.)

@nzlosh
Copy link
Contributor

nzlosh commented May 20, 2021

whoami renders correctly on mattermost v5, perhaps this issue should be closed?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants