Skip to content

Use `markdown--string-width' for aligning table cells#937

Merged
syohex merged 1 commit into
jrblevin:masterfrom
taku0:use-string-width-for-aligning-table
Mar 21, 2026
Merged

Use `markdown--string-width' for aligning table cells#937
syohex merged 1 commit into
jrblevin:masterfrom
taku0:use-string-width-for-aligning-table

Conversation

@taku0

@taku0 taku0 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Description

Use markdown--string-width rather than length in markdown-table-align for aligning cells with fullwidth characters correctly.

Example:

Expected:

|  あああああ  |
|:------------:|
| ああああああ |

Actual:

|    あああああ |
|:------------:|
|    ああああああ |

Related Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING.md document.

  • I have updated the documentation in the README.md file if necessary.

  • I have added an entry to CHANGES.md.

  • I have added tests to cover my changes.

  • All new and existing tests passed (using make test).
    The following tests fail on master:

    • test-markdown-flyspell/check-word-p
    • test-markdown-flyspell/remove-overlay
    • test-markdown-flyspell/yaml-metadata

    The new test succeeds on this branch and fails on master as expected.

@taku0 taku0 force-pushed the use-string-width-for-aligning-table branch from b8ed10a to a55405a Compare March 19, 2026 16:53
@syohex syohex merged commit 182640f into jrblevin:master Mar 21, 2026
4 checks passed
@syohex

syohex commented Mar 21, 2026

Copy link
Copy Markdown
Collaborator

Thanks

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.

2 participants