fix(bug): critical table bugs, add health check, and improve reference id handling#111
Merged
YousefHadder merged 6 commits intomainfrom Nov 7, 2025
Merged
Conversation
5f913cc to
6b8795c
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive testing infrastructure and health check functionality to markdown-plus.nvim, along with refactoring of table row index handling.
Key Changes:
- Introduces a
row_mappermodule to centralize table row index conversions between position-based and cells array-based indexing - Adds health check module (
:checkhealth markdown-plus) for configuration validation and diagnostics - Expands test coverage with new test suites and additional test cases for links, formatting, and health checks
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
spec/markdown-plus/table_row_mapper_spec.lua |
Comprehensive test suite for new row_mapper module with 237 lines of tests |
spec/markdown-plus/links_spec.lua |
Adds 158 lines of tests for reference link ID generation and collision handling |
spec/markdown-plus/health_spec.lua |
New test suite (115 lines) for health check functionality |
spec/markdown-plus/format_spec.lua |
Adds UTF-8 handling tests to ensure plugin doesn't crash with emoji, accents, and CJK characters |
lua/markdown-plus/table/row_mapper.lua |
New module centralizing row index mapping logic with validation and helper functions |
lua/markdown-plus/table/navigation.lua |
Updates row validation to use simplified bounds checking |
lua/markdown-plus/table/manipulation.lua |
Refactors insert_row, delete_row, and duplicate_row to use row_mapper module for safer index handling |
lua/markdown-plus/links/init.lua |
Adds unique reference ID generation with collision detection and URL reuse logic |
lua/markdown-plus/health.lua |
New health check module validating Neovim version, config, features, and detecting plugin conflicts |
README.md |
Adds comprehensive troubleshooting section with health check documentation and common issues |
98f0061 to
884b0c1
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
908c201 to
37d3a64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes critical bugs identified in code review and adds important features to improve plugin reliability and user experience.
Changes
Critical Fixes
row_mapper.luamodule to eliminate ambiguity between position rows and cells array indicesNew Features
:checkhealth markdown-plusimplementation with 10+ validation checksTests
Documentation
Test Plan
:checkhealth markdown-plusNotes
Issue #4 (UTF-8 multi-byte character handling) was attempted but deferred due to implementation complexity. Basic safety tests added to ensure no crashes with UTF-8 input.
🤖 Generated with Claude Code