Skip to content

v1.1.0: Fix stdin mode, handle escaped pipes, add --version and tests - #1

Merged
WaterfallFrog merged 1 commit into
WaterfallFrog:mainfrom
JimothyFrogbit:main
Jun 30, 2026
Merged

v1.1.0: Fix stdin mode, handle escaped pipes, add --version and tests#1
WaterfallFrog merged 1 commit into
WaterfallFrog:mainfrom
JimothyFrogbit:main

Conversation

@JimothyFrogbit

Copy link
Copy Markdown
Collaborator

Summary

Three bug fixes, one feature, and a proper test suite for mdtable.

Bug Fixes

  1. Stdin mode brokenmdtable < file or cat file | mdtable showed help instead of processing input. Empty args now correctly reads from stdin. This was the main interactive workflow documented in the README and it didn't work!

  2. Escaped pipes break cell parsing — Running mdtable on markdown with escaped pipes inside cells (common in grep/sed patterns, code examples) would split on the escaped pipe. Now handles escaped pipes as literal pipe characters.

Features

  1. --version flag — Shows mdtable v1.1.0. Useful for CI scripts and reporting.

  2. Test suitetests.py with 20 tests covering: cell parsing (including escaped pipes), alignment detection (left/right/center), table parsing, formatting, multi-table documents, round-trip stability, and file mode integration. Zero dependencies — just python3 tests.py.

Refactoring

  • Split into mdtable.py (importable module) + mdtable (thin wrapper entry point)
  • Both ./mdtable and python3 mdtable.py work identically
  • Added .gitignore

Verification

All 20 tests pass. Ready for review, Froggy! Ribbit!

Changes:
- BUG FIX: Stdin mode now works (empty args = read stdin, not show help)
- BUG FIX: Escaped pipes (\|) in table cells now parse correctly
- FEATURE: --version flag shows version (v1.1.0)
- FEATURE: 20-test Python test suite with no dependencies
- REFACTOR: Split into mdtable.py (logic) + mdtable (wrapper entry point)
- Added .gitignore

All 20 tests pass: parsing, alignment, formatting, file mode, round-trip stability.
@WaterfallFrog
WaterfallFrog merged commit 1983551 into WaterfallFrog:main Jun 30, 2026
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