export PrettyOptions,prettyPrint from nimpretty (#15865)
This commit is contained in:
parent
7b19217798
commit
204435ad97
1 changed files with 6 additions and 5 deletions
|
|
@ -44,11 +44,11 @@ proc writeVersion() =
|
|||
quit(0)
|
||||
|
||||
type
|
||||
PrettyOptions = object
|
||||
indWidth: Natural
|
||||
maxLineLen: Positive
|
||||
PrettyOptions* = object
|
||||
indWidth*: Natural
|
||||
maxLineLen*: Positive
|
||||
|
||||
proc prettyPrint(infile, outfile: string, opt: PrettyOptions) =
|
||||
proc prettyPrint*(infile, outfile: string, opt: PrettyOptions) =
|
||||
var conf = newConfigRef()
|
||||
let fileIdx = fileInfoIdx(conf, AbsoluteFile infile)
|
||||
let f = splitFile(outfile.expandTilde)
|
||||
|
|
@ -119,4 +119,5 @@ proc main =
|
|||
os.copyFile(source = infile, dest = infileBackup)
|
||||
prettyPrint(infile, outfile, opt)
|
||||
|
||||
main()
|
||||
when isMainModule:
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue