-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
doctoc crashes when space in filename #127
Comments
As far as I can tell, this is the offending line. It looks to have been introduced by this commit: 994839f. @thlorenz: The message for that commit makes it look like this line was added intentionally. Is it safe to remove this line, or is there something else we should be aware of? To explain further, it seems like we manually escape spaces in filenames, which in turn causes |
@jez I think we should write a test that shows the problem and make sure it gets fixed by removing the offending line. I added that line myself and can't quite remember the reasoning behind it. |
Our testing infrastructure currently doesn't test any of the argument parsing or IO code, does it? |
Got this issue today, pls - fix |
As a pre-commit hook doctoc v2.2.0 crashes like this:
|
No it does not, so we'd need to setup CLI tests for this @jez . I understand if that's a bit much to ask, but would be great to have also going forward. Otherwise we could just fix the issue for now without the test. |
In Windows a workaround is to use the DOS 8+3 shortname. The shortnames are shown by Cmd [T:\]
> for %f in ("*.md") do @echo "%f" → "%~sf"
"00 about.md" → "T:\00ABOU~1.MD"
"01 Preparation.md" → "T:\01PREP~1.MD" A different workaround could be to use hard or symbolic links. |
I'm not too sure how important this bug would be, as it seems like not using spaces is better anyways. Discovered this when asking for help on #80
The text was updated successfully, but these errors were encountered: