Skip to content

Commit

Permalink
Minor change to improve Markdown rendering of code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 13, 2024
1 parent 0854be5 commit 0edf2ad
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Inweb 7.2.1

[Version](notes/versioning.md): 7.2.1-beta+1B61 'Escape to Danger' (4 April 2024)
[Version](notes/versioning.md): 7.2.1-beta+1B62 'Escape to Danger' (13 April 2024)

## About Inweb

Expand Down
4 changes: 2 additions & 2 deletions build.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Prerelease: beta
Build Date: 4 April 2024
Build Number: 1B61
Build Date: 13 April 2024
Build Number: 1B62
4 changes: 3 additions & 1 deletion docs/foundation-module/5-im.html
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,9 @@ <h1><a href="../index.html">
<span class="plain-syntax"> </span><a href="4-sm.html#SP15" class="function-link"><span class="function-syntax">Str::clear</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">line</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><a href="4-sm.html#SP15" class="function-link"><span class="function-syntax">Str::clear</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">line_colouring</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">line</span><span class="plain-syntax">, </span><a href="4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">stashed</span><span class="plain-syntax">, </span><span class="identifier-syntax">k</span><span class="plain-syntax">));</span>
<span class="plain-syntax"> </span><span class="identifier-syntax">inchar32_t</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><a href="4-sm.html#SP13" class="function-link"><span class="function-syntax">Str::get_at</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">stashed</span><span class="plain-syntax">, </span><span class="identifier-syntax">k</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">c</span><span class="plain-syntax"> == </span><span class="character-syntax">'\t'</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">line</span><span class="plain-syntax">, </span><span class="string-syntax">" "</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">PUT_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">line</span><span class="plain-syntax">, </span><span class="identifier-syntax">c</span><span class="plain-syntax">);</span>
<span class="plain-syntax"> }</span>
<span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">k</span><span class="plain-syntax"> == </span><a href="4-sm.html#SP8" class="function-link"><span class="function-syntax">Str::len</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">stashed</span><span class="plain-syntax">) - </span><span class="constant-syntax">1</span><span class="plain-syntax">) &amp;&amp; (</span><a href="4-sm.html#SP8" class="function-link"><span class="function-syntax">Str::len</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">line</span><span class="plain-syntax">) &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">))</span>
<span class="plain-syntax"> </span><span class="named-paragraph-container code-font"><a href="5-im.html#SP3_2_4_1" class="named-paragraph-link"><span class="named-paragraph">Render line as code</span><span class="named-paragraph-number">3.2.4.1</span></a></span><span class="plain-syntax">;</span>
Expand Down
Binary file modified docs/goldbach/goldbach.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion foundation-module/Chapter 5/Inform-Flavoured Markdown.w
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,9 @@ and this is fiddly but elementary in the usual way of HTML tables:
Str::clear(line);
Str::clear(line_colouring);
} else {
PUT_TO(line, Str::get_at(md->stashed, k));
inchar32_t c = Str::get_at(md->stashed, k);
if (c == '\t') WRITE_TO(line, " ");
else PUT_TO(line, c);
}
if ((k == Str::len(md->stashed) - 1) && (Str::len(line) > 0))
@<Render line as code@>;
Expand Down

0 comments on commit 0edf2ad

Please sign in to comment.