nscaife / linter-chktex

An Atom Linter plugin for LaTeX, using chktex
https://atom.io/packages/linter-chktex
MIT License
14 stars 10 forks source link

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

Open xiajing1980 opened 8 years ago

xiajing1980 commented 8 years ago

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 commented 7 years ago

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.