Skip to content

fix: fix cli not reading stdin#3967

Merged
UziTech merged 2 commits into
markedjs:masterfrom
UziTech:fix-cli
May 19, 2026
Merged

fix: fix cli not reading stdin#3967
UziTech merged 2 commits into
markedjs:masterfrom
UziTech:fix-cli

Conversation

@UziTech

@UziTech UziTech commented May 5, 2026

Copy link
Copy Markdown
Member

Marked version: 18.0.3

Markdown flavor: CLI

Description

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

@UziTech is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented May 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marked-website Ready Ready Preview, Comment May 5, 2026 4:45am

Request Review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the CLI input handling and enhances the test suite with integration tests. The review identifies a compatibility risk with import.meta.dirname for Node.js versions prior to 20.11.0 and suggests reverting to the previous __dirname approach. Additionally, it notes that shell interpolation for stdin in tests is fragile and recommends using child_process.spawn for improved robustness.

Comment thread test/unit/bin.test.js
Comment thread test/unit/bin.test.js
Comment thread test/unit/bin.test.js
@UziTech UziTech merged commit 11adb69 into markedjs:master May 19, 2026
8 checks passed
github-actions Bot pushed a commit that referenced this pull request May 19, 2026
## [18.0.4](v18.0.3...v18.0.4) (2026-05-19)

### Bug Fixes

* cache list indentation regexes ([#3969](#3969)) ([a37983f](a37983f))
* fix cli not reading stdin ([#3967](#3967)) ([11adb69](11adb69))
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.

CLI Does not Work in 18.0.3

2 participants