Skip to content

Avoid generated TLDR variable name collisions - #87

Merged
Gubarz merged 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/tldr-variable-names
Sep 30, 2026
Merged

Gubarz merged 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/tldr-variable-names

Conversation

@echo8134

Copy link
Copy Markdown
Contributor

Summary

A generated suffix could collide with another placeholder's normalized name. Reserve every emitted name when choosing the next available suffix.

Related issues

No linked issue.

Verification

Exact conversion tests and built convert output cover normalized and generated collisions.

Local checks passed on Go 1.27.1. The CI workflow uses Go 1.26.3.

Checklist

  • go build ./... and go test ./... pass
  • gofmt -l . and go vet ./... are clean
  • Added regression tests for the changed behavior
  • cheatmd --lint examples/ passes
  • Docs/wiki changes are not needed for this fix

@Gubarz
Gubarz marked this pull request as ready for review September 30, 2026 14:55
@Gubarz
Gubarz merged commit 802900b into cheatmd-dev:main Sep 30, 2026
1 check 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