Skip to content

Fixed markdown preview not rendering nested list structure - #110

Merged
oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:bugfix/nested-list-rendering
May 7, 2026
Merged

oleg68 merged 1 commit into
nbplugins:mainfrom
oleg68:bugfix/nested-list-rendering

Conversation

@oleg68

@oleg68 oleg68 commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaced the two flat list renderers (ordered/unordered) in MarkdownRenderer.convertSegment with a single stack-based renderNestedList method
  • Indent level (leading spaces) is used to open/close nested <ol>/<ul> tags, preserving the hierarchy from the source markdown
  • Added 3 unit tests covering nested ordered, nested unordered, and mixed nested lists

Test plan

  • All unit tests pass (mvn test)
  • Open docs/test.md in plugin Markdown Preview — nested lists show with proper visual indentation
  • Other markdown constructs (headings, tables, code blocks, blockquotes) unaffected

🤖 Generated with Claude Code

Replaced flat ordered/unordered list rendering with a stack-based
nested renderer that respects indentation levels, producing proper
nested <ol>/<ul> HTML tags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@oleg68
oleg68 merged commit b33cb02 into nbplugins:main May 7, 2026
3 checks passed
@oleg68
oleg68 deleted the bugfix/nested-list-rendering branch May 7, 2026 19:54
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.

1 participant