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

messages where markdown formatting overlaps slack formatting are rendered incorrectly #3

Closed
twouters opened this issue Jan 7, 2021 · 2 comments · Fixed by #5
Closed

Comments

@twouters
Copy link
Contributor

twouters commented Jan 7, 2021

source bot message:

text: 'message with _in and url <https://example.com/contains_too|example_url>'

rendered body on matrix side:

"formatted_body": "message with <em>in and url &lt;<a href=\"https://example.com/contains\">https://example.com/contains</a></em>too|example_url&gt;
@twouters
Copy link
Contributor Author

twouters commented Jan 7, 2021

Edited initial comment because there should not be a space after the underscore in the test.

it("Should handle named links mixed with underscores", () => {
	expect(markdown.toHTML("Hello _sup <https://example.org/has_too|example>"))
		.toBe("Hello _sup <a href=\"https://example.org/has_too\">example</a>");
});

twouters added a commit to twouters/slack-markdown that referenced this issue Jan 10, 2021
Added some unit tests for reported issues.
Updated simple-markdown to 0.7.3 to include security fix.

Fixes Sorunome#3
Fixes Sorunome#4
twouters added a commit to twouters/slack-markdown that referenced this issue Jan 11, 2021
Added some unit tests for reported issues.
Updated simple-markdown to 0.7.3 to include security fix.

Fixes Sorunome#3
@twouters
Copy link
Contributor Author

reported upstream: ariabuckles/simple-markdown#96

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

Successfully merging a pull request may close this issue.

1 participant