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

feat(lists): add optional space indentation for list items #13

Merged
merged 2 commits into from
Dec 10, 2022

Conversation

catcombo
Copy link
Owner

@catcombo catcombo commented Dec 6, 2022

Fixes #9

@@ -59,7 +59,7 @@ def test_mixed_bullets(self):
def test_match_start_conditions(self):
assert convert("* Item") == "- Item"
assert convert("\n* Item") == "\n- Item"
assert convert(" * Item") == r" \* Item"
assert convert(" * Item") == r"- Item"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

@mfriedenhagen
Copy link

Hi @catcombo, sorry, I will not be able to test this with the "historical" code, another assignment for me and actually I do not know how to do this easily (I am using poetry and do not know how to depend on arbitrary branches there :-)).
I however looked into your test (I did code-reviews-as-job for a couple of years) and your code changes and especially the test does look very reasonable.

@catcombo
Copy link
Owner Author

catcombo commented Dec 9, 2022

I am using poetry and do not know how to depend on arbitrary branches there

This is actually very easy. You just need to add a line to [tool.poetry.dependencies] section of your pyproject.toml:

jira2markdown = { git = "ssh://[email protected]/catcombo/jira2markdown.git", rev = "85113701255fa1dd2f5b47285cb136e8b09c7e4c" }

85113701255fa1dd2f5b47285cb136e8b09c7e4c is the hash of the latest commit from my PR. Run poetry update jira2markdown. Create a test script:

from jira2markdown import convert

print(
    convert("""
  * One
      ** Two
 ** Three
""")
)

I however looked into your test (I did code-reviews-as-job for a couple of years) and your code changes and especially the test does look very reasonable.

I agree with you that tests should be enough. If you can't test the PR or don't have a time to do it, it's not a problem. I'll merge and publish a new release tomorrow.

@catcombo catcombo merged commit 2b46327 into master Dec 10, 2022
@catcombo catcombo deleted the feature/add-list-indentation branch December 10, 2022 09:48
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 this pull request may close these issues.

Indentation breaks list recognition
2 participants