Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

File name parse error in windows while file name start with 'n' #29

Open
xiajing1980 opened this issue Apr 30, 2016 · 1 comment
Open

Comments

@xiajing1980
Copy link

When I use linter-chktex check my paper, a new panel will be opened when I click the warning message.
After some check, I found that occurs because the tex file has a file name begin with character 'n'. The linter must parse the '\n' to some control character and delete it, so the warning messages displayed on the Atom UI will have wrong filename.

This error may not happen on the *nix platform, I guess.

@DrCuriosity
Copy link

I've just encountered the same problem. In linter-chktex.coffee, it looks like it's splitting on '\n', but my project contains paths like thesis\new_introduction.tex.

Tracing it back a bit, it looks like the parseOutput() function is getting output where the carriage returns have already been clobbered to '\n' characters, without any escaping on the Windows-style pathnames, so at that point it's already unrecoverable. Will investigate options.

DrCuriosity added a commit to DrCuriosity/linter-chktex that referenced this issue Jul 19, 2017
Adding a second '\\n' to the chktex format allows the splitter to distinguish between an end-of-line sequence and a Windows pathname (e.g. "c:\thesis\new_introduction.tex".

It will still break if your directory is named 'n', but that's a much less likely case than starting a file with that letter.

Should continue to be compatible with Unix-style paths.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants