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

Template content get escaped in {noformat}/{code} tags #635

Open
olivergondza opened this issue Jun 21, 2023 · 1 comment
Open

Template content get escaped in {noformat}/{code} tags #635

olivergondza opened this issue Jun 21, 2023 · 1 comment

Comments

@olivergondza
Copy link

Describe the bug

Template content get incorrectly escaped in {noformat}/{code} tags.

Please provide following details

  1. JiraCLI Version:
1.4.0-1
(Version="v0.0.0-dev", GitCommit="", CommitDate="", GoVersion="go1.20.4", Compiler="gc", Platform="linux/amd64")
  1. Are you using Jira cloud or on-premise jira server?
SERVER INFO
-----------

Version:         9.4.2
Build Number:    940002
Deployment Type: Server
Default Locale:  
  1. What operating system are you using? Also mention version.
Linux arch 6.3.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 14 Jun 2023 20:10:31 +0000 x86_64 GNU/Linux
  1. What terminal are you using? Also mention version.
kitty 0.28.1

No interactive features involved here, though.

To Reproduce

Steps to reproduce the behavior:

Using jira issue create --project CCITJEN --type Story --summary "Test" --template ./template --no-input. with the ./template:

Careful with the dashes ({{-}}), square-brackets ({{[}} and {{]}}), and exclamation marks({{!}})!

{code}
Careful with the dashes (-), square-brackets ([ and ]), and exclamation marks!
{code}

{noformat}
Careful with the dashes (-), square-brackets ([ and ]), and exclamation marks!
{noformat}

Actual behavior

What I see in JIRA UI issue body is
Screenshot from 2023-06-21 15-11-46

The markdown presented on text edit is:

Careful with the dashes \({{\-}}\), square\-brackets \({{\[}} and {{\]}}\), and exclamation marks\({{\!}}\)\!

{code}
Careful with the dashes \(\-\), square\-brackets \(\[ and \]\), and exclamation marks\!
{code}

{noformat}
Careful with the dashes \(\-\), square\-brackets \(\[ and \]\), and exclamation marks\!
{noformat}

Expected behavior

  • The description to be presented as if the content were pasted into UI edit text window.
    • Screenshot from 2023-06-21 15-20-40
    • (Apparently, it is not satisfied with the {{[}}. Ironically when I let the WYSIWYG editor in JIRA to convert [ in preformatted test, it uses this. Though it is unrelated to this issue.)
  • The markdown presented on JIRA UI edit to be more or less identical. Now it is infested with backslashes.
@funcode
Copy link

funcode commented Jun 25, 2023

This probably is due to the same cause as #407. After I changed md.ToJiraMD to return the input string immediately without doing anything, the markdown works well, except for ({{[}} and {{]}}).

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

No branches or pull requests

2 participants