Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Feb 22, 2020
1 parent 0144679 commit 3efa9fb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/kview/view.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ macro writeExample*(procDef: untyped): untyped =

let
res = ident"result"
procNameId = ident("karax_view_proc_name")
procNameDef = newLetStmt(procNameId, procName.toStrLit)
procNameStr = procName.toStrLit
procWriteOnce = quote do:
once:
writeFile(getAppFilename()[0 .. ^5] & "_" &
`procNameId` & ".html", $(`res`))
`procNameStr` & ".html", $(`res`))

procDef.body.insert(0, procNameDef)
procDef.body.add(procWriteOnce)

return procDef
Expand Down

0 comments on commit 3efa9fb

Please sign in to comment.