mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
[bugfix] fix nimpretty for absolute paths (#11480)
This commit is contained in:
@@ -49,7 +49,9 @@ type
|
||||
proc prettyPrint(infile, outfile: string, opt: PrettyOptions) =
|
||||
var conf = newConfigRef()
|
||||
let fileIdx = fileInfoIdx(conf, AbsoluteFile infile)
|
||||
conf.outFile = RelativeFile outfile
|
||||
let f = splitFile(outfile.expandTilde)
|
||||
conf.outFile = RelativeFile f.name & f.ext
|
||||
conf.outDir = toAbsoluteDir f.dir
|
||||
var p: TParsers
|
||||
p.parser.em.indWidth = opt.indWidth
|
||||
if setupParsers(p, fileIdx, newIdentCache(), conf):
|
||||
|
||||
Reference in New Issue
Block a user