fix(ui): render html tables #227

Open
ChEnylnti wants to merge 1 commit from ChEnylnti/fix/render-html-tables into master
ChEnylnti commented 2026-06-26 03:37:56 -05:00 (Migrated from github.com)

Summary

Render HTML tables in problem descriptions instead of flattening their cells into plain text.

This adds a table tag renderer that:

  • preserves rows and columns from <table>, <tr>, <th>, and <td>
  • supports tables nested inside block containers like <div class="example-block">
  • wraps long cell content based on the description window width
  • draws row separators to keep table structure readable in terminal UI

Verification

  • Verified a minimal top-level table renders correctly
  • Verified a table nested inside <div> renders correctly
  • Verified the real LeetCode CN problem best-time-to-buy-and-sell-stock-using-strategy renders its example tables with rows, columns, and separators
## Summary Render HTML tables in problem descriptions instead of flattening their cells into plain text. This adds a table tag renderer that: - preserves rows and columns from `<table>`, `<tr>`, `<th>`, and `<td>` - supports tables nested inside block containers like `<div class="example-block">` - wraps long cell content based on the description window width - draws row separators to keep table structure readable in terminal UI ## Verification - Verified a minimal top-level table renders correctly - Verified a table nested inside `<div>` renders correctly - Verified the real LeetCode CN problem `best-time-to-buy-and-sell-stock-using-strategy` renders its example tables with rows, columns, and separators
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ChEnylnti/fix/render-html-tables:ChEnylnti/fix/render-html-tables
git switch ChEnylnti/fix/render-html-tables

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff ChEnylnti/fix/render-html-tables
git switch ChEnylnti/fix/render-html-tables
git rebase master
git switch master
git merge --ff-only ChEnylnti/fix/render-html-tables
git switch ChEnylnti/fix/render-html-tables
git rebase master
git switch master
git merge --no-ff ChEnylnti/fix/render-html-tables
git switch master
git merge --squash ChEnylnti/fix/render-html-tables
git switch master
git merge --ff-only ChEnylnti/fix/render-html-tables
git switch master
git merge ChEnylnti/fix/render-html-tables
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
arduinohatesme/leetcode.nvim!227
No description provided.