Files
Nim/rst.html
github-actions[bot] ef3d9e7b38 Deploy to GitHub pages
2025-12-28 15:55:52 +00:00

741 lines
73 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>packages/docutils/rst</title>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
<!-- JS -->
<script type="text/javascript" src="dochack.js?v=2.3.1"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">packages/docutils/rst</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple-boot">
<li><a href="manual.html">Manual</a></li>
<li><a href="lib.html">Standard library</a></li>
<li> <a id="indexLink" href="theindex.html">Index</a></li>
<li><a href="compiler/theindex.html">Compiler docs</a></li>
<li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
<li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput"
oninput="search()" />
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#EParseError" title="EParseError = object of ValueError">EParseError</a></li>
<li><a class="reference" href="#FindFileHandler" title="FindFileHandler = proc (filename: string): string {.closure, gcsafe.}">FindFileHandler</a></li>
<li><a class="reference" href="#FindRefFileHandler" title="FindRefFileHandler = proc (targetRelPath: string): tuple[targetPath: string,
linkRelPath: string] {.closure, gcsafe.}">FindRefFileHandler</a></li>
<li><a class="reference" href="#MsgClass" title="MsgClass = enum
mcHint = &quot;Hint&quot;, mcWarning = &quot;Warning&quot;, mcError = &quot;Error&quot;">MsgClass</a></li>
<li><a class="reference" href="#MsgHandler" title="MsgHandler = proc (filename: string; line, col: int; msgKind: MsgKind;
arg: string) {.closure, gcsafe.}">MsgHandler</a></li>
<li><a class="reference" href="#MsgKind" title="MsgKind = enum
meCannotOpenFile = &quot;cannot open \'$1\'&quot;, meExpected = &quot;\'$1\' expected&quot;,
meMissingClosing = &quot;$1&quot;,
meGridTableNotImplemented = &quot;grid table is not implemented&quot;,
meMarkdownIllformedTable = &quot;illformed delimiter row of a Markdown table&quot;,
meIllformedTable = &quot;Illformed table: $1&quot;,
meNewSectionExpected = &quot;new section expected $1&quot;,
meGeneralParseError = &quot;general parse error&quot;,
meInvalidDirective = &quot;invalid directive: \'$1\'&quot;,
meInvalidField = &quot;invalid field: $1&quot;,
meFootnoteMismatch = &quot;mismatch in number of footnotes and their refs: $1&quot;,
mwRedefinitionOfLabel = &quot;redefinition of label \'$1\'&quot;,
mwUnknownSubstitution = &quot;unknown substitution \'$1\'&quot;,
mwAmbiguousLink = &quot;ambiguous doc link $1&quot;,
mwBrokenLink = &quot;broken link \'$1\'&quot;,
mwUnsupportedLanguage = &quot;language \'$1\' not supported&quot;,
mwUnsupportedField = &quot;field \'$1\' not supported&quot;,
mwRstStyle = &quot;RST style: $1&quot;,
mwUnusedImportdoc = &quot;importdoc for \'$1\' is not used&quot;,
meSandboxedDirective = &quot;disabled directive: \'$1\'&quot;">MsgKind</a></li>
<li><a class="reference" href="#PRstSharedState" title="PRstSharedState = ref RstSharedState">PRstSharedState</a></li>
<li><a class="reference" href="#RstFileTable" title="RstFileTable = object
filenameToIdx*: Table[string, FileIndex]
idxToFilename*: seq[string]">RstFileTable</a></li>
<li><a class="reference" href="#RstParseOption" title="RstParseOption = enum
roSupportSmilies, ## make the RST parser support smilies like ``:)``
roSupportRawDirective, ## support the ``raw`` directive (don't support
## it for sandboxing)
roSupportMarkdown, ## support additional features of Markdown
roPreferMarkdown, ## parse as Markdown (keeping RST as &quot;extension&quot;
## to Markdown) -- implies `roSupportMarkdown`
roNimFile, ## set for Nim files where default interpreted
## text role should be :nim:
roSandboxDisabled ## this option enables certain options
## (e.g. raw, include, importdoc)
## which are disabled by default as they can
## enable users to read arbitrary data and
## perform XSS if the parser is used in a web
## app.">RstParseOption</a></li>
<li><a class="reference" href="#RstParseOptions" title="RstParseOptions = set[RstParseOption]">RstParseOptions</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#ColRstInit" title="ColRstInit = 0">ColRstInit</a></li>
<li><a class="reference" href="#ColRstOffset" title="ColRstOffset = 1">ColRstOffset</a></li>
<li><a class="reference" href="#LineRstInit" title="LineRstInit = 1">LineRstInit</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">addAnchorNim
<li><a class="reference" href="#addAnchorNim%2CPRstSharedState%2Cbool%2Cstring%2Cstring%2CLangSymbol%2Cint%2CTLineInfo%2CFileIndex" title="addAnchorNim(s: var PRstSharedState; external: bool; refn: string;
tooltip: string; langSym: LangSymbol; priority: int;
info: TLineInfo; module: FileIndex)">addAnchorNim(s: var PRstSharedState; external: bool; refn: string;
tooltip: string; langSym: LangSymbol; priority: int;
info: TLineInfo; module: FileIndex)</a></li>
</ul>
<ul class="simple nested-toc-section">addFilename
<li><a class="reference" href="#addFilename%2CPRstSharedState%2Cstring" title="addFilename(s: PRstSharedState; file1: string): FileIndex">addFilename(s: PRstSharedState; file1: string): FileIndex</a></li>
</ul>
<ul class="simple nested-toc-section">addNodes
<li><a class="reference" href="#addNodes%2CPRstNode" title="addNodes(n: PRstNode): string">addNodes(n: PRstNode): string</a></li>
</ul>
<ul class="simple nested-toc-section">completePass2
<li><a class="reference" href="#completePass2%2CPRstSharedState" title="completePass2(s: PRstSharedState)">completePass2(s: PRstSharedState)</a></li>
</ul>
<ul class="simple nested-toc-section">defaultFindFile
<li><a class="reference" href="#defaultFindFile%2Cstring" title="defaultFindFile(filename: string): string">defaultFindFile(filename: string): string</a></li>
</ul>
<ul class="simple nested-toc-section">defaultFindRefFile
<li><a class="reference" href="#defaultFindRefFile%2Cstring" title="defaultFindRefFile(filename: string): (string, string)">defaultFindRefFile(filename: string): (string, string)</a></li>
</ul>
<ul class="simple nested-toc-section">defaultMsgHandler
<li><a class="reference" href="#defaultMsgHandler%2Cstring%2Cint%2Cint%2CMsgKind%2Cstring" title="defaultMsgHandler(filename: string; line, col: int; msgkind: MsgKind;
arg: string)">defaultMsgHandler(filename: string; line, col: int; msgkind: MsgKind;
arg: string)</a></li>
</ul>
<ul class="simple nested-toc-section">getArgument
<li><a class="reference" href="#getArgument%2CPRstNode" title="getArgument(n: PRstNode): string">getArgument(n: PRstNode): string</a></li>
</ul>
<ul class="simple nested-toc-section">getFieldValue
<li><a class="reference" href="#getFieldValue%2CPRstNode" title="getFieldValue(n: PRstNode): string">getFieldValue(n: PRstNode): string</a></li>
<li><a class="reference" href="#getFieldValue%2CPRstNode%2Cstring" title="getFieldValue(n: PRstNode; fieldname: string): string">getFieldValue(n: PRstNode; fieldname: string): string</a></li>
</ul>
<ul class="simple nested-toc-section">newRstSharedState
<li><a class="reference" href="#newRstSharedState%2CRstParseOptions%2Cstring%2CFindFileHandler%2CFindRefFileHandler%2CMsgHandler%2Cbool" title="newRstSharedState(options: RstParseOptions; filename: string;
findFile: FindFileHandler; findRefFile: FindRefFileHandler;
msgHandler: MsgHandler; hasToc: bool): PRstSharedState">newRstSharedState(options: RstParseOptions; filename: string;
findFile: FindFileHandler; findRefFile: FindRefFileHandler;
msgHandler: MsgHandler; hasToc: bool): PRstSharedState</a></li>
</ul>
<ul class="simple nested-toc-section">preparePass2
<li><a class="reference" href="#preparePass2%2CPRstSharedState%2CPRstNode" title="preparePass2(s: var PRstSharedState; mainNode: PRstNode; importdoc = true)">preparePass2(s: var PRstSharedState; mainNode: PRstNode; importdoc = true)</a></li>
</ul>
<ul class="simple nested-toc-section">resolveSubs
<li><a class="reference" href="#resolveSubs%2CPRstSharedState%2CPRstNode" title="resolveSubs(s: PRstSharedState; n: PRstNode): PRstNode">resolveSubs(s: PRstSharedState; n: PRstNode): PRstNode</a></li>
</ul>
<ul class="simple nested-toc-section">rstMessage
<li><a class="reference" href="#rstMessage%2CRstFileTable%2CMsgHandler%2CTLineInfo%2CMsgKind%2Cstring" title="rstMessage(filenames: RstFileTable; f: MsgHandler; info: TLineInfo;
msgKind: MsgKind; arg: string)">rstMessage(filenames: RstFileTable; f: MsgHandler; info: TLineInfo;
msgKind: MsgKind; arg: string)</a></li>
</ul>
<ul class="simple nested-toc-section">rstnodeToRefname
<li><a class="reference" href="#rstnodeToRefname%2CPRstNode" title="rstnodeToRefname(n: PRstNode): string">rstnodeToRefname(n: PRstNode): string</a></li>
</ul>
<ul class="simple nested-toc-section">rstParse
<li><a class="reference" href="#rstParse%2Cstring%2Cstring%2Cint%2Cint%2CRstParseOptions%2CFindFileHandler%2CFindRefFileHandler%2CMsgHandler" title="rstParse(text, filename: string; line, column: int; options: RstParseOptions;
findFile: FindFileHandler = nil; findRefFile: FindRefFileHandler = nil;
msgHandler: MsgHandler = nil): tuple[node: PRstNode,
filenames: RstFileTable, hasToc: bool]">rstParse(text, filename: string; line, column: int; options: RstParseOptions;
findFile: FindFileHandler = nil; findRefFile: FindRefFileHandler = nil;
msgHandler: MsgHandler = nil): tuple[node: PRstNode,
filenames: RstFileTable, hasToc: bool]</a></li>
</ul>
<ul class="simple nested-toc-section">rstParsePass1
<li><a class="reference" href="#rstParsePass1%2Cstring%2Cint%2Cint%2CPRstSharedState" title="rstParsePass1(fragment: string; line, column: int; sharedState: PRstSharedState): PRstNode">rstParsePass1(fragment: string; line, column: int; sharedState: PRstSharedState): PRstNode</a></li>
</ul>
<ul class="simple nested-toc-section">safeProtocol
<li><a class="reference" href="#safeProtocol%2Cstring" title="safeProtocol(linkStr: var string): string">safeProtocol(linkStr: var string): string</a></li>
</ul>
<ul class="simple nested-toc-section">setCurrFilename
<li><a class="reference" href="#setCurrFilename%2CPRstSharedState%2Cstring" title="setCurrFilename(s: PRstSharedState; file1: string)">setCurrFilename(s: PRstSharedState; file1: string)</a></li>
</ul>
<ul class="simple nested-toc-section">whichMsgClass
<li><a class="reference" href="#whichMsgClass%2CMsgKind" title="whichMsgClass(k: MsgKind): MsgClass">whichMsgClass(k: MsgKind): MsgClass</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">This module implements a <span id="restructuredtext_1">reStructuredText</span> (RST) and <span id="markdown_1">Markdown</span> parser. User's manual on supported markup syntax and command line usage can be found in <a class="reference external" href="markdown_rst.html">Nim-flavored Markdown and reStructuredText</a>.<ul class="simple"><li>See also <a class="reference external" href="docgen.html">Nim DocGen Tools Guide</a> for handling of <tt class="docutils literal"><span class="pre">.nim</span></tt> files.</li>
<li>See also <a class="reference external" href="rstgen.html">packages/docutils/rstgen module</a> to know how to generate HTML or Latex strings (for embedding them into custom documents).</li>
</ul>
<p>Choice between Markdown and RST as well as optional additional features are turned on by passing <tt class="docutils literal"><span class="pre">options:</span></tt> <a class="reference internal nimdoc" title="type RstParseOptions" href="#RstParseOptions">RstParseOptions</a> to <a class="reference internal nimdoc" title="proc rstParse(text, filename: string; line, column: int; options: RstParseOptions;
findFile: FindFileHandler = nil; findRefFile: FindRefFileHandler = nil;
msgHandler: MsgHandler = nil): tuple[node: PRstNode,
filenames: RstFileTable, hasToc: bool]" href="#rstParse,string,string,int,int,RstParseOptions,FindFileHandler,FindRefFileHandler,MsgHandler">proc rstParse</a>.</p>
</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="os.html">os</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="enumutils.html">enumutils</a>, <a class="reference external" href="algorithm.html">algorithm</a>, <a class="reference external" href="lists.html">lists</a>, <a class="reference external" href="sequtils.html">sequtils</a>, <a class="reference external" href="tables.html">tables</a>, <a class="reference external" href="strscans.html">strscans</a>, <a class="reference external" href="dochelpers.html">dochelpers</a>, <a class="reference external" href="rstidx.html">rstidx</a>, <a class="reference external" href="rstast.html">rstast</a>, <a class="reference external" href="miscdollars.html">miscdollars</a>, <a class="reference external" href="highlite.html">highlite</a>, <a class="reference external" href="assertions.html">assertions</a>, <a class="reference external" href="syncio.html">syncio</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="EParseError">
<dt><pre><a href="rst.html#EParseError"><span class="Identifier">EParseError</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="exceptions.html#ValueError"><span class="Identifier">ValueError</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L446" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L446" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="FindFileHandler">
<dt><pre><a href="rst.html#FindFileHandler"><span class="Identifier">FindFileHandler</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span class="Identifier">closure</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L83" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L83" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="FindRefFileHandler">
<dt><pre><a href="rst.html#FindRefFileHandler"><span class="Identifier">FindRefFileHandler</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">targetRelPath</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">targetPath</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span>
<span class="Identifier">linkRelPath</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span> {.<span class="Identifier">closure</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span></span>.}</pre></dt>
<dd>
returns where .html or .idx file should be found by its relative path; <tt class="docutils literal"><span class="pre"><span class="Identifier">linkRelPath</span></span></tt> is a prefix to be added before a link anchor from such file
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L84" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L84" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="MsgClass">
<dt><pre><a href="rst.html#MsgClass"><span class="Identifier">MsgClass</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">mcHint</span> <span class="Other">=</span> <span class="StringLit">&quot;Hint&quot;</span><span class="Other">,</span> <span class="Identifier">mcWarning</span> <span class="Other">=</span> <span class="StringLit">&quot;Warning&quot;</span><span class="Other">,</span> <span class="Identifier">mcError</span> <span class="Other">=</span> <span class="StringLit">&quot;Error&quot;</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L53" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L53" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="MsgHandler">
<dt><pre><a href="rst.html#MsgHandler"><span class="Identifier">MsgHandler</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">line</span><span class="Other">,</span> <span class="Identifier">col</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span> <span class="Identifier">msgKind</span><span class="Other">:</span> <a href="rst.html#MsgKind"><span class="Identifier">MsgKind</span></a><span class="Other">;</span>
<span class="Identifier">arg</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span class="Identifier">closure</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span></span>.}</pre></dt>
<dd>
what to do in case of an error
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L81" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L81" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="MsgKind">
<dt><pre><a href="rst.html#MsgKind"><span class="Identifier">MsgKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">meCannotOpenFile</span> <span class="Other">=</span> <span class="StringLit">&quot;cannot open \'$1\'&quot;</span><span class="Other">,</span> <span class="Identifier">meExpected</span> <span class="Other">=</span> <span class="StringLit">&quot;\'$1\' expected&quot;</span><span class="Other">,</span>
<span class="Identifier">meMissingClosing</span> <span class="Other">=</span> <span class="StringLit">&quot;$1&quot;</span><span class="Other">,</span>
<span class="Identifier">meGridTableNotImplemented</span> <span class="Other">=</span> <span class="StringLit">&quot;grid table is not implemented&quot;</span><span class="Other">,</span>
<span class="Identifier">meMarkdownIllformedTable</span> <span class="Other">=</span> <span class="StringLit">&quot;illformed delimiter row of a Markdown table&quot;</span><span class="Other">,</span>
<span class="Identifier">meIllformedTable</span> <span class="Other">=</span> <span class="StringLit">&quot;Illformed table: $1&quot;</span><span class="Other">,</span>
<span class="Identifier">meNewSectionExpected</span> <span class="Other">=</span> <span class="StringLit">&quot;new section expected $1&quot;</span><span class="Other">,</span>
<span class="Identifier">meGeneralParseError</span> <span class="Other">=</span> <span class="StringLit">&quot;general parse error&quot;</span><span class="Other">,</span>
<span class="Identifier">meInvalidDirective</span> <span class="Other">=</span> <span class="StringLit">&quot;invalid directive: \'$1\'&quot;</span><span class="Other">,</span>
<span class="Identifier">meInvalidField</span> <span class="Other">=</span> <span class="StringLit">&quot;invalid field: $1&quot;</span><span class="Other">,</span>
<span class="Identifier">meFootnoteMismatch</span> <span class="Other">=</span> <span class="StringLit">&quot;mismatch in number of footnotes and their refs: $1&quot;</span><span class="Other">,</span>
<span class="Identifier">mwRedefinitionOfLabel</span> <span class="Other">=</span> <span class="StringLit">&quot;redefinition of label \'$1\'&quot;</span><span class="Other">,</span>
<span class="Identifier">mwUnknownSubstitution</span> <span class="Other">=</span> <span class="StringLit">&quot;unknown substitution \'$1\'&quot;</span><span class="Other">,</span>
<span class="Identifier">mwAmbiguousLink</span> <span class="Other">=</span> <span class="StringLit">&quot;ambiguous doc link $1&quot;</span><span class="Other">,</span>
<span class="Identifier">mwBrokenLink</span> <span class="Other">=</span> <span class="StringLit">&quot;broken link \'$1\'&quot;</span><span class="Other">,</span>
<span class="Identifier">mwUnsupportedLanguage</span> <span class="Other">=</span> <span class="StringLit">&quot;language \'$1\' not supported&quot;</span><span class="Other">,</span>
<span class="Identifier">mwUnsupportedField</span> <span class="Other">=</span> <span class="StringLit">&quot;field \'$1\' not supported&quot;</span><span class="Other">,</span>
<span class="Identifier">mwRstStyle</span> <span class="Other">=</span> <span class="StringLit">&quot;RST style: $1&quot;</span><span class="Other">,</span>
<span class="Identifier">mwUnusedImportdoc</span> <span class="Other">=</span> <span class="StringLit">&quot;importdoc for \'$1\' is not used&quot;</span><span class="Other">,</span>
<span class="Identifier">meSandboxedDirective</span> <span class="Other">=</span> <span class="StringLit">&quot;disabled directive: \'$1\'&quot;</span></pre></dt>
<dd>
the possible messages
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L59" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L59" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="PRstSharedState">
<dt><pre><a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">RstSharedState</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L428" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L428" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RstFileTable">
<dt><pre><a href="rst.html#RstFileTable"><span class="Identifier">RstFileTable</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">filenameToIdx</span><span class="Operator">*</span><span class="Other">:</span> <a href="tables.html#Table"><span class="Identifier">Table</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">]</span>
<span class="Identifier">idxToFilename</span><span class="Operator">*</span><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L386" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L386" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RstParseOption">
<dt><pre><a href="rst.html#RstParseOption"><span class="Identifier">RstParseOption</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">roSupportSmilies</span><span class="Other">,</span> <span class="Comment">## make the RST parser support smilies like ``:)``</span>
<span class="Identifier">roSupportRawDirective</span><span class="Other">,</span> <span class="Comment">## support the ``raw`` directive (don't support</span>
<span class="Comment">## it for sandboxing)</span>
<span class="Identifier">roSupportMarkdown</span><span class="Other">,</span> <span class="Comment">## support additional features of Markdown</span>
<span class="Identifier">roPreferMarkdown</span><span class="Other">,</span> <span class="Comment">## parse as Markdown (keeping RST as &quot;extension&quot;</span>
<span class="Comment">## to Markdown) -- implies `roSupportMarkdown`</span>
<span class="Identifier">roNimFile</span><span class="Other">,</span> <span class="Comment">## set for Nim files where default interpreted</span>
<span class="Comment">## text role should be :nim:</span>
<span class="Identifier">roSandboxDisabled</span> <span class="Comment">## this option enables certain options</span>
<span class="Comment">## (e.g. raw, include, importdoc)</span>
<span class="Comment">## which are disabled by default as they can</span>
<span class="Comment">## enable users to read arbitrary data and</span>
<span class="Comment">## perform XSS if the parser is used in a web</span>
<span class="Comment">## app.</span></pre></dt>
<dd>
options for the RST parser
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L35" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L35" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RstParseOptions">
<dt><pre><a href="rst.html#RstParseOptions"><span class="Identifier">RstParseOptions</span></a> <span class="Other">=</span> <a href="system.html#set"><span class="Identifier">set</span></a><span class="Other">[</span><a href="rst.html#RstParseOption"><span class="Identifier">RstParseOption</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L51" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L51" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<div id="ColRstInit">
<dt><pre><a href="rst.html#ColRstInit"><span class="Identifier">ColRstInit</span></a> <span class="Other">=</span> <span class="DecNumber">0</span></pre></dt>
<dd>
Initial column number for standalone RST text (Nim global reporting adds ColOffset=1)
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L451" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L451" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="ColRstOffset">
<dt><pre><a href="rst.html#ColRstOffset"><span class="Identifier">ColRstOffset</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
<dd>
1: a replica of ColOffset for internal use
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L453" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L453" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="LineRstInit">
<dt><pre><a href="rst.html#LineRstInit"><span class="Identifier">LineRstInit</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
<dd>
Initial line number for standalone RST text
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L450" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L450" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="addAnchorNim-procs-all">
<div id="addAnchorNim,PRstSharedState,bool,string,string,LangSymbol,int,TLineInfo,FileIndex">
<dt><pre><span class="Keyword">proc</span> <a href="#addAnchorNim%2CPRstSharedState%2Cbool%2Cstring%2Cstring%2CLangSymbol%2Cint%2CTLineInfo%2CFileIndex"><span class="Identifier">addAnchorNim</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">;</span> <span class="Identifier">external</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a><span class="Other">;</span> <span class="Identifier">refn</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span>
<span class="Identifier">tooltip</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">langSym</span><span class="Other">:</span> <a href="dochelpers.html#LangSymbol"><span class="Identifier">LangSymbol</span></a><span class="Other">;</span> <span class="Identifier">priority</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span>
<span class="Identifier">info</span><span class="Other">:</span> <a href="rstast.html#TLineInfo"><span class="Identifier">TLineInfo</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Adds an anchor <tt class="docutils literal"><span class="pre"><span class="Identifier">refn</span></span></tt>, which follows the rule <tt class="docutils literal"><span class="pre"><span class="Identifier">arNim</span></span></tt> (i.e. a symbol in <tt class="docutils literal"><span class="pre">*.nim</span></tt> file)
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L863" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L863" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="addFilename-procs-all">
<div id="addFilename,PRstSharedState,string">
<dt><pre><span class="Keyword">proc</span> <a href="#addFilename%2CPRstSharedState%2Cstring"><span class="Identifier">addFilename</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">;</span> <span class="Identifier">file1</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#FileIndex"><span class="Identifier">FileIndex</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns index of filename, adding it if it has not been used before
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L507" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L507" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="addNodes-procs-all">
<div id="addNodes,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#addNodes%2CPRstNode"><span class="Identifier">addNodes</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L91" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L91" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="completePass2-procs-all">
<div id="completePass2,PRstSharedState">
<dt><pre><span class="Keyword">proc</span> <a href="#completePass2%2CPRstSharedState"><span class="Identifier">completePass2</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L3862" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L3862" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="defaultFindFile-procs-all">
<div id="defaultFindFile,string">
<dt><pre><span class="Keyword">proc</span> <a href="#defaultFindFile%2Cstring"><span class="Identifier">defaultFindFile</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L477" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L477" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="defaultFindRefFile-procs-all">
<div id="defaultFindRefFile,string">
<dt><pre><span class="Keyword">proc</span> <a href="#defaultFindRefFile%2Cstring"><span class="Identifier">defaultFindRefFile</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Other">(</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L481" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L481" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="defaultMsgHandler-procs-all">
<div id="defaultMsgHandler,string,int,int,MsgKind,string">
<dt><pre><span class="Keyword">proc</span> <a href="#defaultMsgHandler%2Cstring%2Cint%2Cint%2CMsgKind%2Cstring"><span class="Identifier">defaultMsgHandler</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">line</span><span class="Other">,</span> <span class="Identifier">col</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span> <span class="Identifier">msgkind</span><span class="Other">:</span> <a href="rst.html#MsgKind"><span class="Identifier">MsgKind</span></a><span class="Other">;</span>
<span class="Identifier">arg</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">EParseError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L467" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L467" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getArgument-procs-all">
<div id="getArgument,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#getArgument%2CPRstNode"><span class="Identifier">getArgument</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L93" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L93" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getFieldValue-procs-all">
<div id="getFieldValue,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#getFieldValue%2CPRstNode"><span class="Identifier">getFieldValue</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<p>Returns the value of a specific <tt class="docutils literal"><span class="pre">rnField</span></tt> node.</p>
<p>This proc will assert if the node is not of the expected type. The empty string will be returned as a minimum. Any value in the rst will be stripped form leading/trailing whitespace.</p>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L2076" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L2076" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="getFieldValue,PRstNode,string">
<dt><pre><span class="Keyword">proc</span> <a href="#getFieldValue%2CPRstNode%2Cstring"><span class="Identifier">getFieldValue</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">;</span> <span class="Identifier">fieldname</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L92" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L92" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newRstSharedState-procs-all">
<div id="newRstSharedState,RstParseOptions,string,FindFileHandler,FindRefFileHandler,MsgHandler,bool">
<dt><pre><span class="Keyword">proc</span> <a href="#newRstSharedState%2CRstParseOptions%2Cstring%2CFindFileHandler%2CFindRefFileHandler%2CMsgHandler%2Cbool"><span class="Identifier">newRstSharedState</span></a><span class="Other">(</span><span class="Identifier">options</span><span class="Other">:</span> <a href="rst.html#RstParseOptions"><span class="Identifier">RstParseOptions</span></a><span class="Other">;</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span>
<span class="Identifier">findFile</span><span class="Other">:</span> <a href="rst.html#FindFileHandler"><span class="Identifier">FindFileHandler</span></a><span class="Other">;</span>
<span class="Identifier">findRefFile</span><span class="Other">:</span> <a href="rst.html#FindRefFileHandler"><span class="Identifier">FindRefFileHandler</span></a><span class="Other">;</span> <span class="Identifier">msgHandler</span><span class="Other">:</span> <a href="rst.html#MsgHandler"><span class="Identifier">MsgHandler</span></a><span class="Other">;</span>
<span class="Identifier">hasToc</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L533" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L533" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="preparePass2-procs-all">
<div id="preparePass2,PRstSharedState,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#preparePass2%2CPRstSharedState%2CPRstNode"><span class="Identifier">preparePass2</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">;</span> <span class="Identifier">mainNode</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">;</span> <span class="Identifier">importdoc</span> <span class="Other">=</span> <span class="Identifier">true</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Records titles in node <tt class="docutils literal"><span class="pre"><span class="Identifier">mainNode</span></span></tt> and orders footnotes.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L3648" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L3648" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="resolveSubs-procs-all">
<div id="resolveSubs,PRstSharedState,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#resolveSubs%2CPRstSharedState%2CPRstNode"><span class="Identifier">resolveSubs</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">;</span> <span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadEnvEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Makes pass 2 of RST parsing. Resolves substitutions and anchor aliases, groups footnotes. Takes input node <tt class="docutils literal"><span class="pre"><span class="Identifier">n</span></span></tt> and returns the same node with recursive substitutions in <tt class="docutils literal"><span class="pre"><span class="Identifier">n</span><span class="Operator">.</span><span class="Identifier">sons</span></span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">result</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L3767" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L3767" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="rstMessage-procs-all">
<div id="rstMessage,RstFileTable,MsgHandler,TLineInfo,MsgKind,string">
<dt><pre><span class="Keyword">proc</span> <a href="#rstMessage%2CRstFileTable%2CMsgHandler%2CTLineInfo%2CMsgKind%2Cstring"><span class="Identifier">rstMessage</span></a><span class="Other">(</span><span class="Identifier">filenames</span><span class="Other">:</span> <a href="rst.html#RstFileTable"><span class="Identifier">RstFileTable</span></a><span class="Other">;</span> <span class="Identifier">f</span><span class="Other">:</span> <a href="rst.html#MsgHandler"><span class="Identifier">MsgHandler</span></a><span class="Other">;</span> <span class="Identifier">info</span><span class="Other">:</span> <a href="rstast.html#TLineInfo"><span class="Identifier">TLineInfo</span></a><span class="Other">;</span>
<span class="Identifier">msgKind</span><span class="Other">:</span> <a href="rst.html#MsgKind"><span class="Identifier">MsgKind</span></a><span class="Other">;</span> <span class="Identifier">arg</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Print warnings using <tt class="docutils literal"><span class="pre"><span class="Identifier">info</span></span></tt>, i.e. in 2nd-pass warnings for footnotes/substitutions/references or from <tt class="docutils literal"><span class="pre">rstgen.nim</span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L575" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L575" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="rstnodeToRefname-procs-all">
<div id="rstnodeToRefname,PRstNode">
<dt><pre><span class="Keyword">proc</span> <a href="#rstnodeToRefname%2CPRstNode"><span class="Identifier">rstnodeToRefname</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L90" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L90" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="rstParse-procs-all">
<div id="rstParse,string,string,int,int,RstParseOptions,FindFileHandler,FindRefFileHandler,MsgHandler">
<dt><pre><span class="Keyword">proc</span> <a href="#rstParse%2Cstring%2Cstring%2Cint%2Cint%2CRstParseOptions%2CFindFileHandler%2CFindRefFileHandler%2CMsgHandler"><span class="Identifier">rstParse</span></a><span class="Other">(</span><span class="Identifier">text</span><span class="Other">,</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">line</span><span class="Other">,</span> <span class="Identifier">column</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span>
<span class="Identifier">options</span><span class="Other">:</span> <a href="rst.html#RstParseOptions"><span class="Identifier">RstParseOptions</span></a><span class="Other">;</span> <span class="Identifier">findFile</span><span class="Other">:</span> <a href="rst.html#FindFileHandler"><span class="Identifier">FindFileHandler</span></a> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">;</span>
<span class="Identifier">findRefFile</span><span class="Other">:</span> <a href="rst.html#FindRefFileHandler"><span class="Identifier">FindRefFileHandler</span></a> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">;</span>
<span class="Identifier">msgHandler</span><span class="Other">:</span> <a href="rst.html#MsgHandler"><span class="Identifier">MsgHandler</span></a> <span class="Other">=</span> <span class="Keyword">nil</span><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">node</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a><span class="Other">,</span>
<span class="Identifier">filenames</span><span class="Other">:</span> <a href="rst.html#RstFileTable"><span class="Identifier">RstFileTable</span></a><span class="Other">,</span> <span class="Identifier">hasToc</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a><span class="Other">]</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Parses the whole <tt class="docutils literal"><span class="pre"><span class="Identifier">text</span></span></tt>. The result is ready for <tt class="docutils literal"><span class="pre"><span class="Identifier">rstgen</span><span class="Operator">.</span><span class="Identifier">renderRstToOut</span></span></tt>, note that 2nd tuple element should be fed to <tt class="docutils literal"><span class="pre"><span class="Identifier">initRstGenerator</span></span></tt> argument <tt class="docutils literal"><span class="pre"><span class="Identifier">filenames</span></span></tt> (it is being filled here at least with <tt class="docutils literal"><span class="pre"><span class="Identifier">filename</span></span></tt> and possibly with other files from RST <tt class="docutils literal"><span class="pre">.. include::</span></tt> statement).
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L3868" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L3868" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="rstParsePass1-procs-all">
<div id="rstParsePass1,string,int,int,PRstSharedState">
<dt><pre><span class="Keyword">proc</span> <a href="#rstParsePass1%2Cstring%2Cint%2Cint%2CPRstSharedState"><span class="Identifier">rstParsePass1</span></a><span class="Other">(</span><span class="Identifier">fragment</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">line</span><span class="Other">,</span> <span class="Identifier">column</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span>
<span class="Identifier">sharedState</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rstast.html#PRstNode"><span class="Identifier">PRstNode</span></a> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Parses an RST <tt class="docutils literal"><span class="pre"><span class="Identifier">fragment</span></span></tt>. The result should be further processed by <a class="reference internal nimdoc" title="proc preparePass2(s: var PRstSharedState; mainNode: PRstNode; importdoc = true)" href="#preparePass2,PRstSharedState,PRstNode">preparePass2</a> and <a class="reference internal nimdoc" title="proc resolveSubs(s: PRstSharedState; n: PRstNode): PRstNode" href="#resolveSubs,PRstSharedState,PRstNode">resolveSubs</a> (which is pass 2).
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L3559" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L3559" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="safeProtocol-procs-all">
<div id="safeProtocol,string">
<dt><pre><span class="Keyword">proc</span> <a href="#safeProtocol%2Cstring"><span class="Identifier">safeProtocol</span></a><span class="Other">(</span><span class="Identifier">linkStr</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L1254" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L1254" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="setCurrFilename-procs-all">
<div id="setCurrFilename,PRstSharedState,string">
<dt><pre><span class="Keyword">proc</span> <a href="#setCurrFilename%2CPRstSharedState%2Cstring"><span class="Identifier">setCurrFilename</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="rst.html#PRstSharedState"><span class="Identifier">PRstSharedState</span></a><span class="Other">;</span> <span class="Identifier">file1</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L515" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L515" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="whichMsgClass-procs-all">
<div id="whichMsgClass,MsgKind">
<dt><pre><span class="Keyword">proc</span> <a href="#whichMsgClass%2CMsgKind"><span class="Identifier">whichMsgClass</span></a><span class="Other">(</span><span class="Identifier">k</span><span class="Other">:</span> <a href="rst.html#MsgKind"><span class="Identifier">MsgKind</span></a><span class="Other">)</span><span class="Other">:</span> <a href="rst.html#MsgClass"><span class="Identifier">MsgClass</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
returns which message class <tt class="docutils literal"><span class="pre"><span class="Identifier">k</span></span></tt> belongs to.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/packages/docutils/rst.nim#L459" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/packages/docutils/rst.nim#L459" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2025-12-28 15:55:32 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>