Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1/🚀] Ignore single trailing comments on section header lines #6

Conversation

kyle-rader-msft
Copy link
Contributor

This PR addresses #5 in a relatively simple way looking for the last index of matching ] and comment (#, or ;) chars. If we find both, and the comment is after the last ], then ignore everything after that last comment character.

@kyle-rader-msft kyle-rader-msft force-pushed the user/kyrader/trailing-comments branch from ea572d5 to 2ced38a Compare March 1, 2024 19:04
@kyle-rader-msft kyle-rader-msft changed the title Ignore single trailing comments on section header lines [1/🚀] Ignore single trailing comments on section header lines Mar 1, 2024
@TheDaemoness TheDaemoness merged commit d469e3e into TheDaemoness:main Mar 2, 2024
4 checks passed
@kyle-rader-msft kyle-rader-msft deleted the user/kyrader/trailing-comments branch March 4, 2024 18:10
TheDaemoness pushed a commit that referenced this pull request Mar 7, 2024
A small simplification from #6 since the `match` only cares about 1
scenario, an `if let` block can do the same thing in a slightly cleaner
way removing the unused match arm.

Co-authored-by: Kyle Rader <[email protected]>
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