Skip to content

Commit

Permalink
Fix docgen snippet numbering (#13507)
Browse files Browse the repository at this point in the history
  • Loading branch information
genotrance authored Mar 3, 2020
1 parent e8c057f commit f817568
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/docgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef,
initStrTable result.types
result.onTestSnippet =
proc (gen: var RstGenerator; filename, cmd: string; status: int; content: string) =
inc(gen.id)
var d = TDocumentor(gen)
var outp: AbsoluteFile
if filename.len == 0:
inc(d.id)
let nameOnly = splitFile(d.filename).name
outp = getNimcacheDir(conf) / RelativeDir(nameOnly) /
RelativeFile(nameOnly & "_snippet_" & $d.id & ".nim")
Expand Down
2 changes: 1 addition & 1 deletion lib/system/inclrtl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ when defined(nimlocks):
else:
{.pragma: benign, gcsafe.}

template since(version, body: untyped) {.dirty.} =
template since(version, body: untyped) {.dirty, used.} =
## limitation: can't be used to annotate a template (eg typetraits.get), would
## error: cannot attach a custom pragma.
when (NimMajor, NimMinor) >= version:
Expand Down

0 comments on commit f817568

Please sign in to comment.