Update grid-to-pipe table converter with alignment support

- Properly preserves left/center/right alignment from grid tables
- Added --check mode for pre-commit warning
- Added book-check-grid-tables hook to warn about grid tables
- Grid tables should be converted to pipe for better inline Python support
This commit is contained in:
Vijay Janapa Reddi
2026-02-01 22:50:09 -05:00
parent a85d513cd1
commit 8578982175
2 changed files with 205 additions and 82 deletions

View File

@@ -190,6 +190,14 @@ repos:
pass_filenames: false
files: ^book/quarto/contents/.*\.qmd$
- id: book-check-grid-tables
name: "Book: Warn about grid tables (prefer pipe tables)"
entry: python book/tools/scripts/utilities/convert_grid_to_pipe_tables.py --check
language: python
pass_filenames: true
files: ^book/quarto/contents/.*\.qmd$
verbose: true
- id: book-validate-part-keys
name: "Book: Validate part keys"
entry: python book/tools/scripts/utilities/validate_part_keys.py