slack-ruby / slack-ruby-client

A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
MIT License
1.21k stars 216 forks source link

Don't treat asterisks in list items as italic in Markdown #528

Closed rspeicher closed 2 weeks ago

rspeicher commented 2 weeks ago

Fixes an issue where asterisks used for list items were converted to underscores.

Before:

  1) Slack::Messages::Formatting#markdown doesn't treat list items as text formatting
     Failure/Error: expect(formatting.markdown(msg)).to eq msg

       expected: "Une liste:\n\n* Article 1\n* Article 2\n* Article 3\n"
            got: "Une liste:\n\n_ Article 1\n_ Article 2\n* Article 3\n"

       (compared using ==)

       Diff:
       @@ -1,6 +1,6 @@
        Une liste:

       -* Article 1
       -* Article 2
       +_ Article 1
       +_ Article 2
        * Article 3

     # ./spec/slack/messages/formatting_spec.rb:161:in `block (3 levels) in <top (required)>'

Introduced in https://github.com/slack-ruby/slack-ruby-client/pull/520.

coveralls commented 2 weeks ago

Pull Request Test Coverage Report for Build 11729294352

Details


Totals Coverage Status
Change from base Build 11707538954: 89.3%
Covered Lines: 5395
Relevant Lines: 6039

💛 - Coveralls
dblock commented 2 weeks ago

Perfect, thank you.