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

Wrong conversion of emoji to Jira Markup #8511

Closed
saladpanda opened this issue Dec 31, 2022 · 5 comments
Closed

Wrong conversion of emoji to Jira Markup #8511

saladpanda opened this issue Dec 31, 2022 · 5 comments

Comments

@saladpanda
Copy link

Explain the problem.
Jira renders :P and :D as emoji except when followed by [0-9A-Za-z].
So the following Jira Markup:

:PZ :DZ
:P[ :D[
:P :D
:P  :D 
:P  :D 
:P] :D]
:P^ :D^
:P_ :D_
:P` :D`
:Pa :Da
:P1 :D1

Is rendered like this:
image

The Jira renderer however escapes the : in all of the cases which leads to a backslash being rendered where there should be none.

$  pandoc pandoc -f markdown -t jira test.md
\:PZ \:DZ <– wrong
\:P\[ \:D\[
\:P \:D
\:P \:D
\:P  \:D 
\:P\] \:D\]
\:P\^ \:D\^
\:P\_ \:D\_
\:P` \:D`
\:Pa \:Da <– wrong
\:P1 \:D1 <– wrong

Pandoc version?

$ pandoc --version
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5

Same result with the latest version

@saladpanda saladpanda added the bug label Dec 31, 2022
@jgm
Copy link
Owner

jgm commented Jan 1, 2023

You're converting from Markdown, so the Markdown rules, not the Jira ones, determine the meaning of the expression :P. In Markdown :P is just a literal colon plus the letter P -- so that's what we deliver in Jira output.

Thus, not a bug.

@jgm jgm closed this as completed Jan 1, 2023
@saladpanda
Copy link
Author

saladpanda commented Jan 1, 2023

@jgm please reopen.

I'm sorry, my bug report was not clear enough. Let me try again:

Expected result:
Markdown input: :P :P_ :PA :Pa :P2
Pandoc conversion to jira markup: \:P \:P\_ :PA :Pa :P2
Rendered by jira like this:
image

Actual result:
Markdown input: :P :P_ :PA :Pa :P2
Pandoc conversion to jira markup:

$ echo ":P :P_ :PA :Pa :P2" | pandoc -f markdown -t jira
\:P \:P\_ \:PA \:Pa \:P2

Rendered by jira like this:
image

So pandoc is actually outputting too many backslashes. The last three backslashes are wrong.

@tarleb
Copy link
Collaborator

tarleb commented Jan 1, 2023

This will require fixing in tarleb/jira-wiki-markup.

@saladpanda
Copy link
Author

Thanks. I guess this also deserves the "reader" tag since the reader wrongfully consumes the backslash in these situations:

echo "\:PA" | pandoc -f jira -t markdown
:PA

The correct output would be \:PA

@tarleb tarleb added the reader label Jan 1, 2023
@tarleb
Copy link
Collaborator

tarleb commented Jan 1, 2023

Good point, thanks.

@tarleb tarleb closed this as completed in 7f5bd40 Jan 11, 2023
liruqi pushed a commit to chinapedia/pandoc that referenced this issue Mar 3, 2023
Fixed issues with icon-like sequences at the beginning of words.

Fixes: jgm#8511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants