summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndrey Makarov <ph.makarov@gmail.com>2021-02-15 16:12:40 +0300
committerGitHub <noreply@github.com>2021-02-15 14:12:40 +0100
commit35bd39a9d0eef1396b2f6a562430ec63e36b7921 (patch)
treecf83fd97d39b7ae11663d965d6652603f2778247 /compiler
parent56f5010fa405018d40c4416ffe86bd3aaa1cb75a (diff)
downloadNim-35bd39a9d0eef1396b2f6a562430ec63e36b7921.tar.gz
RST: implement footnotes and citations (#16960)
* RST: implement footnotes and citations
* manual fixup of nimdoc.out.css
* remove unused code
* shorter printing code
* Update lib/packages/docutils/rst.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim1
-rw-r--r--compiler/lineinfos.nim2
2 files changed, 3 insertions, 0 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 6d105f722..13e45e9af 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -137,6 +137,7 @@ template declareClosures =
     of meNewSectionExpected: k = errNewSectionExpected
     of meGeneralParseError: k = errGeneralParseError
     of meInvalidDirective: k = errInvalidDirectiveX
+    of meFootnoteMismatch: k = errFootnoteMismatch
     of mwRedefinitionOfLabel: k = warnRedefinitionOfLabel
     of mwUnknownSubstitution: k = warnUnknownSubstitutionX
     of mwUnsupportedLanguage: k = warnLanguageXNotSupported
diff --git a/compiler/lineinfos.nim b/compiler/lineinfos.nim
index c4546b7ed..d78086fd8 100644
--- a/compiler/lineinfos.nim
+++ b/compiler/lineinfos.nim
@@ -34,6 +34,7 @@ type
     errGeneralParseError,
     errNewSectionExpected,
     errInvalidDirectiveX,
+    errFootnoteMismatch,
     errProveInit, # deadcode
     errGenerated,
     errUser,
@@ -84,6 +85,7 @@ const
     errGeneralParseError: "general parse error",
     errNewSectionExpected: "new section expected",
     errInvalidDirectiveX: "invalid directive: '$1'",
+    errFootnoteMismatch: "number of footnotes and their references don't match: $1",
     errProveInit: "Cannot prove that '$1' is initialized.",  # deadcode
     errGenerated: "$1",
     errUser: "$1",