Skip to content

Commit 0fd81c5

Browse files
committed
gen docs
1 parent c16c7e8 commit 0fd81c5

19 files changed

+24
-23
lines changed

docs/regex.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,14 +509,15 @@ <h2><a class="toc-backref" id="examples-match-macro" href="#examples-match-macro
509509
<span class="Identifier">doAssert</span> <span class="Identifier">matches</span> <span class="Operator">==</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="StringLit">&quot;my link&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;https://example.com&quot;</span><span class="Punctuation">]</span>
510510
<span class="Identifier">matched</span> <span class="Operator">=</span> <span class="Identifier">true</span>
511511
<span class="Identifier">doAssert</span> <span class="Identifier">matched</span></pre>
512-
<h2><a class="toc-backref" id="examples-bad-utfminus8-input-text" href="#examples-bad-utfminus8-input-text">Bad UTF-8 input text</a></h2><p>This lib makes no effort to handle bad/malformed UTF-8 input text. The behaviour on bad input is currently undefined, and it will likely result in an internal AssertionDefect or some other error.</p>
513-
<p>What can be done about this is validating the input text before passing it to the match function.</p>
512+
<h2><a class="toc-backref" id="examples-bad-utfminus8-input-text" href="#examples-bad-utfminus8-input-text">Bad UTF-8 input text</a></h2><p>This lib makes no effort to handle invalid UTF-8 input text (i.e: malformed or corrupted). The behaviour on invalid input is currently undefined, and it will likely result in an internal AssertionDefect or some other error.</p>
513+
<p>What can be done about this is validating the input text to avoid passing invalid input to the match function.</p>
514514
<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">unicode</span>
515515
<span class="Comment"># good input text</span>
516516
<span class="Identifier">doAssert</span> <span class="Identifier">validateUtf8</span><span class="Punctuation">(</span><span class="StringLit">&quot;abc&quot;</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="Operator">-</span><span class="DecNumber">1</span>
517517
<span class="Comment"># bad input text</span>
518-
<span class="Identifier">doAssert</span> <span class="Identifier">validateUtf8</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\xf8</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span> <span class="Operator">!=</span> <span class="Operator">-</span><span class="DecNumber">1</span></pre>
519-
<h2><a class="toc-backref" id="examples-match-binary-data" href="#examples-match-binary-data">Match binary data</a></h2><p>Matching on arbitrary binary data (i.e: not utf-8) is not currently supported. Both the regex and the input text are assumed to be valid utf-8. The input text is treated as utf-8, and setting the regex to ASCII mode won't help.</p>
518+
<span class="Identifier">doAssert</span> <span class="Identifier">validateUtf8</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\xf8</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="EscapeSequence">\xa1</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span> <span class="Operator">!=</span> <span class="Operator">-</span><span class="DecNumber">1</span></pre><p>Note at the time of writting this, Nim's <tt class="docutils literal"><span class="pre"><span class="Identifier">validateUtf8</span></span></tt> <a class="reference external" href="https://github.com/nim-lang/Nim/issues/19333">is not strict enough</a> and so you are better off using <a class="reference external" href="https://github.com/nitely/nim-unicodeplus">nim-unicodeplus's</a> <tt class="docutils literal"><span class="pre"><span class="Identifier">verifyUtf8</span></span></tt> function.</p>
519+
520+
<h2><a class="toc-backref" id="examples-match-binary-data" href="#examples-match-binary-data">Match binary data</a></h2><p>Matching on arbitrary binary data (i.e: not utf-8) is not currently supported. Both the regex and the input text are expected to be valid utf-8. The input text is treated as utf-8, and setting the regex to ASCII mode won't help.</p>
520521
</p>
521522
<div class="section" id="6">
522523
<h1><a class="toc-backref" href="#6">Imports</a></h1>
@@ -1283,7 +1284,7 @@ <h1><a class="toc-backref" href="#19">Exports</a></h1>
12831284
<div class="twelve-columns footer">
12841285
<span class="nim-sprite"></span>
12851286
<br/>
1286-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:57 UTC</small>
1287+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:45 UTC</small>
12871288
</div>
12881289
</div>
12891290
</div>

docs/regex/common.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
278278
<div class="twelve-columns footer">
279279
<span class="nim-sprite"></span>
280280
<br/>
281-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
281+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:25 UTC</small>
282282
</div>
283283
</div>
284284
</div>

docs/regex/compiler.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
163163
<div class="twelve-columns footer">
164164
<span class="nim-sprite"></span>
165165
<br/>
166-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
166+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:26 UTC</small>
167167
</div>
168168
</div>
169169
</div>

docs/regex/dotgraph.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
173173
<div class="twelve-columns footer">
174174
<span class="nim-sprite"></span>
175175
<br/>
176-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
176+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:26 UTC</small>
177177
</div>
178178
</div>
179179
</div>

docs/regex/exptransformation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
191191
<div class="twelve-columns footer">
192192
<span class="nim-sprite"></span>
193193
<br/>
194-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
194+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:25 UTC</small>
195195
</div>
196196
</div>
197197
</div>

docs/regex/exptype.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ <h1><a class="toc-backref" href="#7">Types</a></h1>
163163
<div class="twelve-columns footer">
164164
<span class="nim-sprite"></span>
165165
<br/>
166-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
166+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:25 UTC</small>
167167
</div>
168168
</div>
169169
</div>

docs/regex/litopt.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
191191
<div class="twelve-columns footer">
192192
<span class="nim-sprite"></span>
193193
<br/>
194-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
194+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:25 UTC</small>
195195
</div>
196196
</div>
197197
</div>

docs/regex/nfa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
189189
<div class="twelve-columns footer">
190190
<span class="nim-sprite"></span>
191191
<br/>
192-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
192+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:25 UTC</small>
193193
</div>
194194
</div>
195195
</div>

docs/regex/nfafindall.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ <h1><a class="toc-backref" href="#15">Iterators</a></h1>
264264
<div class="twelve-columns footer">
265265
<span class="nim-sprite"></span>
266266
<br/>
267-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
267+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:26 UTC</small>
268268
</div>
269269
</div>
270270
</div>

docs/regex/nfafindall2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ <h1><a class="toc-backref" href="#15">Iterators</a></h1>
266266
<div class="twelve-columns footer">
267267
<span class="nim-sprite"></span>
268268
<br/>
269-
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-01 08:40:40 UTC</small>
269+
<small style="color: var(--hint);">Made with Nim. Generated: 2023-10-17 17:22:26 UTC</small>
270270
</div>
271271
</div>
272272
</div>

0 commit comments

Comments
 (0)