jira-cli icon indicating copy to clipboard operation
jira-cli copied to clipboard

Bad rendering of Markdown for the description section of a Jira ticket

Open SoheilSalmani opened this issue 1 year ago • 3 comments

Describe the bug

I found a case where Markdown code is not rendered well in the description section of a Jira ticket when using the jira issue create command.

Please provide following details

  1. JiraCLI Version:
    (Version="1.5.1", GitCommit="0e0f82d52ef5a775d2cc662fbe38d9732b9b5c59", CommitDate="2024-01-20T10:48:06+00:00", GoVersion="go1.21.5", Compiler="gc", Platform="darwin/arm64")
    
  2. Are you using Jira cloud or on-premise jira server?
    SERVER INFO
    -----------
    
    Version:         1001.0.0-SNAPSHOT
    Build Number:    100247
    Deployment Type: Cloud
    Default Locale:  en_US
    
  3. What operating system are you using? Also mention version.
    macOS Sonoma 14.1.1 (23B81)
    
  4. What terminal are you using? Also mention version.
    iTerm 2 Build 3.4.23
    

To Reproduce

Steps to reproduce the behavior:

  1. Run:

    jira issue create
    
  2. In your editor (I use nvim), type:

    Short description.
    
    ## Code snippet
    
    ```python
    import numpy as np
    ```
    
    
  3. Submit the issue.

I get the following results in Jira:

image

Furthermore, the code snippet is not automatically set to "Python" (in this example, it is set to "Java").

Expected behavior

image

SoheilSalmani avatar Mar 09 '24 12:03 SoheilSalmani

Note that I don't have this problem when using Jira-flavored Markdown:

Short description.

h2. Code snippet

{code:python}
import numpy as np
{code}

SoheilSalmani avatar Mar 09 '24 12:03 SoheilSalmani

This only seem to happen in Jira Cloud

ankitpokhrel avatar Apr 06 '24 10:04 ankitpokhrel

This is also happening to me on JIRA Cloud.

image

image

I've tried different line endings, different flavors of Markdown, different amount of returns between lines, and different styles of bullet points but they all result in the same thing.

blbaker avatar May 14 '24 14:05 blbaker