stricter checks for RST headlines (#17089)
This commit is contained in:
parent
0fcf1af765
commit
d1fec552d0
9 changed files with 72 additions and 17 deletions
|
|
@ -261,6 +261,10 @@ proc mainCommand*(graph: ModuleGraph) =
|
|||
if optGenIndex in conf.globalOptions and optWholeProject in conf.globalOptions:
|
||||
commandBuildIndex(conf, $conf.outDir)
|
||||
of cmdRst2html:
|
||||
# XXX: why are warnings disabled by default for rst2html and rst2tex?
|
||||
for warn in [warnUnknownSubstitutionX, warnLanguageXNotSupported,
|
||||
warnFieldXNotSupported, warnRstStyle]:
|
||||
conf.setNoteDefaults(warn, true)
|
||||
conf.setNoteDefaults(warnRedefinitionOfLabel, false) # similar to issue #13218
|
||||
when defined(leanCompiler):
|
||||
quit "compiler wasn't built with documentation generator"
|
||||
|
|
@ -268,6 +272,10 @@ proc mainCommand*(graph: ModuleGraph) =
|
|||
loadConfigs(DocConfig, cache, conf, graph.idgen)
|
||||
commandRst2Html(cache, conf)
|
||||
of cmdRst2tex:
|
||||
for warn in [warnRedefinitionOfLabel, warnUnknownSubstitutionX,
|
||||
warnLanguageXNotSupported,
|
||||
warnFieldXNotSupported, warnRstStyle]:
|
||||
conf.setNoteDefaults(warn, true)
|
||||
when defined(leanCompiler):
|
||||
quit "compiler wasn't built with documentation generator"
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue