Skip to content

Conversation

@mcepl
Copy link
Contributor

@mcepl mcepl commented Dec 22, 2025

There are many situations when using markdown-it as a filter could be hugely beneficial (I was just integrating it to my aerc workflow for generating HTML mails from Markdown). Yes, I can write a trivial shell script working around it, but it is silly, it is much better for this functionality be included here.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.80%. Comparing base (c62983f) to head (1360fab).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
markdown_it/cli/parse.py 70.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (70.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
+ Coverage   95.76%   95.80%   +0.04%     
==========================================
  Files          64       64              
  Lines        3445     3455      +10     
==========================================
+ Hits         3299     3310      +11     
+ Misses        146      145       -1     
Flag Coverage Δ
pytests 95.80% <70.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

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

Looks good from an initial quick look cheers, can you update to fix the pre-commit issues

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

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

- Add --stdin flag to parse_args for reading from stdin
- Add convert_stdin() function to handle stdin parsing
- Update main() to call convert_stdin() when --stdin flag is used
- Add comprehensive tests for stdin functionality and CLI behavior

Signed-off-by: Matěj Cepl <[email protected]>
@chrisjsewell chrisjsewell changed the title Add --stdin option to CLI for reading Markdown from standard input ✨ Add --stdin option to CLI Dec 24, 2025
Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

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

great cheers!

@chrisjsewell chrisjsewell merged commit 49043e4 into executablebooks:master Dec 24, 2025
14 of 15 checks passed
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