Skip to content

Conversation

@dereuromark
Copy link
Contributor

Summary

Adds support for marking header cells with |= prefix instead of requiring a separator row. This is simpler and more intuitive, especially for users coming from wiki markup (Creole).

Features

  • |= Cell marks a header cell
  • |=< Left-aligned header
  • |=> Right-aligned header
  • |=~ Center-aligned header

Example

|= Name |= Age |
| Alice | 28   |
| Bob   | 34   |

Renders as:

<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Alice</td><td>28</td></tr>
<tr><td>Bob</td><td>34</td></tr>
</table>

Backwards Compatible

The traditional separator row syntax continues to work unchanged:

| Name  | Age |
|-------|-----|
| Alice | 28  |

Related

Test plan

  • Added unit tests for basic |= header syntax
  • Added tests for alignment markers (|=<, |=>, |=~)
  • Added tests for mixed header/regular cells
  • Verified all 812 existing tests still pass
  • Manual verification of HTML output

@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.33%. Comparing base (94e7a96) to head (09c86ed).

Additional details and impacted files
@@             Coverage Diff              @@
##             master       #8      +/-   ##
============================================
+ Coverage     92.28%   92.33%   +0.05%     
- Complexity     1406     1411       +5     
============================================
  Files            53       53              
  Lines          3616     3640      +24     
============================================
+ Hits           3337     3361      +24     
  Misses          279      279              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds support for marking header cells with |= prefix instead of requiring
a separator row. This is simpler and more intuitive, especially for users
coming from wiki markup.

Features:
- |= Cell marks a header cell
- |=< Left-aligned header
- |=> Right-aligned header
- |=~ Center-aligned header

The traditional separator row syntax continues to work unchanged.

See: jgm/djot#354
@dereuromark dereuromark force-pushed the feature/table-header-equals-syntax branch from ad3e8ae to 09c86ed Compare November 30, 2025 04:22
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