Skip to content

Conversation

@vkrasnoselskikh
Copy link

@vkrasnoselskikh vkrasnoselskikh commented Nov 28, 2025

Description

Fix Markdown multi level bullet list.

Fixes: #717

Changes

Changed regular expression by this rules

Testing

  • Unit tests added/updated
  • Integration tests passed
  • Manual checks performed: [briefly describe]

Checklist

  • Code follows project style guidelines (linting passes).
  • Tests added/updated for changes.
  • All tests pass locally.
  • Documentation updated (if needed).
@vkrasnoselskikh vkrasnoselskikh force-pushed the fix/bug#717 branch 2 times, most recently from 5346a96 to 2099715 Compare December 1, 2025 10:46
Copy link
Owner

@sooperset sooperset left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @vkrasnoselskikh! The regex improvements are solid — supporting multiple bullet markers (-, +, *), fixing the root-level numbered list pattern, and using the correct Jira wiki format (**, *** instead of space indentation).

However, I tested the exact case from issue #717 and it's not fully fixed:

Test case from issue #717:

"* Item A\n * Sub-item A.1\n * Sub-sub-item A.1.1\n* Item B"

(Note: 2-space indentation per level)

Expected:

* Item A ** Sub-item A.1 *** Sub-sub-item A.1.1 * Item B 

Actual with this PR:

* Item A * Sub-item A.1 ← should be ** ** Sub-sub-item ← should be *** * Item B 

The issue is the formula ident // 4 + 1 assumes 4-space indentation, but the original issue uses 2-space indentation (which is common in many editors).

Suggested fix:
Change ident // 4 + 1 to ident // 2 + 1 for bullet lists:

level = ident // 2 + 1

Also a small typo: ### Bulet Lists### Bullet Lists

Would you be able to update the PR with these changes? Happy to help if you have any questions!

@vkrasnoselskikh
Copy link
Author

@sooperset Thanks for review!

I've added all the corrections you suggested - please take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants