Skip to content

fix: align gfmrun example counter with actual runnable count#2369

Open
dearchap wants to merge 1 commit into
mainfrom
fix/gfmrun-count-and-examples
Open

fix: align gfmrun example counter with actual runnable count#2369
dearchap wants to merge 1 commit into
mainfrom
fix/gfmrun-count-and-examples

Conversation

@dearchap

Copy link
Copy Markdown
Contributor

Replaces the naive strings.Contains(line, "package main") counter with a proper code-fence parser that mirrors gfmrun's own logic:

  • Count go blocks only when their first code line is package main
  • Count sh and bash blocks exactly (not sh-session)
  • Changes informational sh examples in binary-size.md to sh-session (they reference ./cmd/myapp which does not exist in CI)
  • Fixes code examples in path-and-walk.md (broken imports, missing context, wrong Subcommands field name)

Closes #2362

- Replace naive 'package main' counter with proper code fence parser
  that matches gfmrun's logic (go blocks with package main, exact sh/bash)
- Change informational sh examples to sh-session so they aren't run
  by gfmrun (they reference ./cmd/myapp which doesn't exist in CI)
@dearchap dearchap requested a review from a team as a code owner June 14, 2026 20:35
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.

1 participant