Edge case handling - Emojis, unicode characters, empty cells, long content
Silent operation - No console logs, errors don't interrupt workflow
Validation feedback - Invalid tables get helpful error comments
Key behaviors:
Bold/italic symbols outside code are hidden by concealment but width calculated correctly
**bold** inside backticks shows as literal text with proper spacing
Emojis and unicode characters align properly
Columns have consistent spacing
How It Works
This plugin uses Opencode's experimental.text.complete hook to format markdown tables after the AI finishes generating text. It intelligently strips markdown symbols (for width calculation) while preserving symbols inside inline code blocks, ensuring tables align correctly ONLY with Opencode's concealment mode enabled (the default setting).
The plugin uses a multi-pass regex algorithm to handle nested markdown (like **bold with code inside**) and caches width calculations for performance.
Troubleshooting
Tables not formatting?
Ensure the plugin is listed in your .opencode/opencode.jsonc config
Restart Opencode after adding the plugin
Check that tables have a separator row (|---|---|)
Invalid table structure comment?
The plugin validates tables before formatting
All rows must have the same number of columns
Tables must have at least 2 rows including the separator