Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

tocLessonRank sets an empty stem for any non-.md basename, misclassifying it

Open Beginner friendly
#343 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli

Research direction

Start in src/engine/toc-chain.ts around line 850, in tocLessonRank, where the stem is derived from the basename, and compare it with the parseNumericPrefix call near line 853. Compute one stem by stripping a trailing .md or falling back to the lowercased basename, and pass that same value to both the README/phase/assignment checks and parseNumericPrefix. Done means a non-.md candidate is ranked as intended, and any existing tests for tocLessonRank still pass.

Written by the indexing model from the issue text.

Description

bug core priority: low

Location: src/engine/toc-chain.ts:850

stem becomes '' for any basename not ending in .md, so README/phase/assignment checks fail and the note falls to rank 3, while the numeric check on :853 uses the full basename. Extension handling is split between two inputs, giving a subtly wrong chain order for edge-case candidates.

Fix: Compute stem by stripping a trailing .md if present else the whole lowercased basename, and feed that same stem to parseNumericPrefix.

From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
22h 21m
Merged PRs (30d)
167

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.