Skip to content

Handle escaped pipes in README table parsers#107

Merged
Jose-Gael-Cruz-Lopez merged 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/escaped-pipe-table-parsing
Jul 13, 2026
Merged

Handle escaped pipes in README table parsers#107
Jose-Gael-Cruz-Lopez merged 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/escaped-pipe-table-parsing

Conversation

@ChimdumebiNebolisa

Copy link
Copy Markdown
Contributor

Summary

Parse markdown table rows on unescaped pipe delimiters so escaped \| cell content does not shift columns.

Problem

The README generator escapes literal pipes as \|, but parsers split on every raw | character. A pipe in host, title, location, or prize corrupts or drops the row.

Changes

  • Add split_table_cells helper in util.py
  • Use it in weekly_digest.py and generate_banner.py
  • Add splitTableCells in parse-readme.ts for the frontend parser
  • Regression tests in Python and Vitest

Validation

  • python -m unittest discover -s .github/scripts -p "test_*.py" - 50 tests OK
  • npm test in web/ - 52 tests OK

Scope

No change to pipe-free rows. closing_soon.py already used unescaped-pipe splitting.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jose-Gael-Cruz-Lopez Jose-Gael-Cruz-Lopez merged commit 0811963 into Hack-HQ:main Jul 13, 2026
2 checks passed
Jose-Gael-Cruz-Lopez added a commit to ChimdumebiNebolisa/hackhq that referenced this pull request Jul 13, 2026
Resolves the conflict with Hack-HQ#107 (both PRs appended a test class at the same
spot in test_scripts.py). Kept both: SplitTableCells from main, plus this PR's
ResolveState and CloseOpportunityState. util.py auto-merged cleanly, so Hack-HQ#107's
split_table_cells and this PR's resolve_state change both survive.

Also closes the gap this PR left open. It made util.resolve_state check
active is False FIRST, but the web deriveState still checked opens_soon first,
so a listing with state=opens_soon + active=false rendered CLOSED in the README
and OPENS SOON on the site. Reordered deriveState so closed wins over
opens_soon, matching resolve_state, and added a parity regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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