Skip to content

Keep skipped conditional variables empty - #97

Draft
echo8134 wants to merge 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/headless-conditions
Draft

echo8134 wants to merge 1 commit into
cheatmd-dev:mainfrom
echo8134:fix/headless-conditions

Conversation

@echo8134

Copy link
Copy Markdown
Contributor

Summary

After marking an unmatched conditional variable resolved, headless resolution continued and populated it anyway. Stop resolving that variable once definition selection has resolved it.

Related issues

No linked issue.

Verification

Tests cover false and matching conditions for literal and shell definitions. A built headless print case also confirms that skipped values remain empty.

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

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