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

Don't transform files whose TOC is unchanged #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akheron
Copy link

@akheron akheron commented Aug 13, 2019

Looking at the code, this was always the intention, but there was a small bug in the logic that this PR fixes. Some tests needed to be updated, because they relied on the fact that even unchanged TOC was reported as transformed.

This is helpful e.g. to check in CI that all TOCs have been updated, like this:

doctoc --stdout . | grep -q "should be updated" && echo "TOCs are out of date!"

Looking at the code, this was always the intention, but there was a
small bug in the logic that this patch fixes.

This is helpful e.g. to check in CI that all TOCs have been updated,
like this:

    doctoc --stdout . | grep -q "should be updated" && echo "TOCs are out of date!"
@thlorenz
Copy link
Owner

thlorenz commented Jul 3, 2021

@AndrewSouthpaw this looks nice and assuming it doesn't break existing functionality we could merge that in and publish a major version upgrade.
What do you think?

And @akheron sorry for the multi-year delay on my part 😢

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.

None yet

2 participants