summaryrefslogtreecommitdiffstats
path: root/articles/asciideck/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-13 15:33:18 +0200
committerLoïc Hoguin <[email protected]>2018-06-13 15:33:18 +0200
commitecf6d483b55d573292475c61ae21c9702dce5e01 (patch)
tree20ab9d52d05abe9126249e9721e542ed7a575484 /articles/asciideck/index.html
parent89d4d7f0b3a453b648bced460de04ca4675ebafc (diff)
downloadninenines.eu-ecf6d483b55d573292475c61ae21c9702dce5e01.tar.gz
ninenines.eu-ecf6d483b55d573292475c61ae21c9702dce5e01.tar.bz2
ninenines.eu-ecf6d483b55d573292475c61ae21c9702dce5e01.zip
Fix bad copy paste
Thanks @krzysiekj
Diffstat (limited to 'articles/asciideck/index.html')
-rw-r--r--articles/asciideck/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/articles/asciideck/index.html b/articles/asciideck/index.html
index a7b09d70..17efbfcb 100644
--- a/articles/asciideck/index.html
+++ b/articles/asciideck/index.html
@@ -80,9 +80,9 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#000000">comment_line</font></b>(<font color="#009900">St</font>) →
- «<font color="#FF0000">"//"</font>, <font color="#009900">Comment0</font><font color="#990000">/</font><font color="#FF6600">bits</font>» <font color="#990000">=</font> <b><font color="#000000">read_line</font></b>(<font color="#009900">St</font>),
+ <font color="#990000">&lt;&lt;</font><font color="#FF0000">"//"</font>, <font color="#009900">Comment0</font><font color="#990000">/</font><font color="#FF6600">bits</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=</font> <b><font color="#000000">read_line</font></b>(<font color="#009900">St</font>),
<font color="#009900">Comment</font> <font color="#990000">=</font> <b><font color="#000000">trim</font></b>(<font color="#009900">Comment0</font>),
- {<font color="#FF6600">comment_line</font>, #{«<font color="#FF0000">"subs"</font>» ⇒ «<font color="#FF0000">"verbatim"</font>»}, <font color="#009900">Comment</font>, <b><font color="#000000">ann</font></b>(<font color="#009900">St</font>)}<font color="#990000">.</font></tt></pre>
+ {<font color="#FF6600">comment_line</font>, #{<font color="#990000">&lt;&lt;</font><font color="#FF0000">"subs"</font><font color="#990000">&gt;&gt;</font> <font color="#990000">=&gt;</font> <font color="#990000">&lt;&lt;</font><font color="#FF0000">"verbatim"</font><font color="#990000">&gt;&gt;</font>}, <font color="#009900">Comment</font>, <b><font color="#000000">ann</font></b>(<font color="#009900">St</font>)}<font color="#990000">.</font></tt></pre>
</div></div>
<p>When the line begins with <code>//</code> this matches: we have a comment line and we return the block we just parsed. When the line doesn&apos;t begin with <code>//</code> the function will crash and Asciideck will try the next parse function in the list.</p>
<p>This makes the code easy to read and improve. I am very happy with how it turned out.</p>