Skip to content

Conversation

reagle
Copy link

@reagle reagle commented Aug 18, 2025

Vibe coding using Claude Opus 4.1 thinking to add alignment to pandoc grid tables.

Description

Adds column alignment support for Pandoc grid tables using colon markers in separator rows.

Changes

  • Recognize alignment markers in separator rows (:===, ===:, :==:)
  • Add PandocAlignColumn and PandocAlignRow classes to handle alignment
  • Apply alignment to data cells based on separator row markers
  • Maintain full backward compatibility with non-aligned tables

Example

+---------+-------+--------------------+
| Fruit   | Price | Advantages         |
+:========+======:+:==================:+
| Bananas | $1.34 | built-in wrapper   |
+---------+-------+--------------------+
| Oranges | $2.10 | cures scurvy       |
+---------+-------+--------------------+

Left-aligned, center-aligned, and right-aligned columns are now properly recognized and preserved.

@FichteFoll
Copy link
Member

I don't have the capacity to review this currently. @keith-hall maybe?

Copy link
Member

@keith-hall keith-hall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a cursory look and the changes seem fine. I feel like it should be safe to merge - if something doesn't work, it is easy to revert back to the BorderTable Parser/Driver implementations while this Pandoc implementation gets debugged.

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.

3 participants