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

Indentation breaks list recognition #9

Closed
mfriedenhagen opened this issue Jun 30, 2022 · 4 comments · Fixed by #13
Closed

Indentation breaks list recognition #9

mfriedenhagen opened this issue Jun 30, 2022 · 4 comments · Fixed by #13

Comments

@mfriedenhagen
Copy link

Hello,

  • Thanks for the library, works like a charme in general.

  • I am using jira2markdown in version 0.2.1 in a poetry project.

  • if you use the visual editor in JIRA, you often get a blank in front of the list symbol. It is nonetheless correctly visualized in JIRA.

❯ python
Python 3.10.5 (main, Jun 23 2022, 17:15:25) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import jira2markdown
>>> jira2markdown.convert('* Blue\n* Green')
'- Blue\n- Green'
>>> jira2markdown.convert(' * Blue\n * Green')
' \\* Blue\n \\* Green'
@catcombo
Copy link
Owner

@mfriedenhagen sorry for the very long answer. Does JIRA add a space before all list characters (including nested list characters)? Does JIRA add only one space or more?

@mfriedenhagen
Copy link
Author

Hi @catcombo, no problem, we are all busy people :-). To reproduce, create a ticket and use the visual editor. When you then start typing * item1<ENTER>* item2 and then switch to text mode, the markup will look like this:

* item1
 * item2 

So it is even inconsistent :-(
The same happens when you just enter item1<ENTER>item2<ENTER>, select the two lines and then click the "Bullet List" icon. First line has no leading space, second one has.

@catcombo
Copy link
Owner

catcombo commented Dec 6, 2022

@mfriedenhagen I tried to reproduce it on my company's JIRA in-cloud instance and I wasn't successful with that. There is no text mode, only visual mode. I remember that JIRA looked different 2 years ago, probably visual editor is set by default now for all in-cloud instances.

But I was able to switch to the old ticket view and I did some tests with the old editor. I can confirm that space indents before the list items do not affect the list rendering. I prepared a #13 Could you please test it?

@catcombo
Copy link
Owner

Changes are released in version 0.3.1.

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.

2 participants