add hack-a-round for language specified markdown code blocks

When language is specified in a markdown code block such as:

````
```c
    printf("Hello, world!\n");
```
````

is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.

A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment.  For example:

````
```<!---c-->
    printf("Hello, world!\n");
```
````

This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better  "_hack-a-round_" to the "markdown code language
specifier" problem is found.

The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:

```
<pre class="&lt;!---c--&gt;"><code> .. </code></pre>
```

We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.

For now, this hack-a-round will have to do.
This commit is contained in:
Landon Curt Noll committed 2024-04-04 14:50:38 -07:00
1 parent 3919df50fb
commit b66c79254a
700 files changed
+7052 -7056

No files matched your search

+14 -14
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make
```
@@ -21,7 +21,7 @@ For more detailed information see [2001 kev bugs](../../bugs.html#2001_kev).
## To use:
```sh
```<!---sh-->
./kev # in one terminal
./kev hostname # in another terminal
@@ -32,7 +32,7 @@ NOTE: each player's paddle is at the bottom and the opponent at the top.
## Try:
```sh
```<!---sh-->
./kev # in one terminal
./kev localhost # in another terminal on the same host
@@ -41,13 +41,13 @@ NOTE: each player's paddle is at the bottom and the opponent at the top.
If you need to change the speed you can reconfigure it like (say
for over a network and not the same host):
```sh
```<!---sh-->
make clobber SPEED=50 all # original default value which is very fast
```
If you wish to change the port you can do so like:
```sh
```<!---sh-->
make clobber PORT=3773 all
```
@@ -58,19 +58,19 @@ syscall with the `l_` macro, changing the `L` variable like one would `PORT`. Of
course you can do more than one at the same time. For instance to change the
speed and port:
```sh
```<!---sh-->
make clobber SPEED=512 PORT=3773 all
```
If you have `xterm` try on one system:
```sh
```<!---sh-->
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &
```
and then the other, the client system:
```sh
```<!---sh-->
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&
```
@@ -85,7 +85,7 @@ awkward `,` and `.` keys to move your paddle.
### Alternate build:
```sh
```<!---sh-->
make alt
```
@@ -105,13 +105,13 @@ terminal?
If you have `xterm` try on one system:
```sh
```<!---sh-->
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt &
```
and then the other, the client system:
```sh
```<!---sh-->
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt localhost&
```
@@ -151,14 +151,14 @@ getting the ball past your opponent's paddle. It's pretty fun! :)
Run the server first without any command line arguments, i.e.
```sh
```<!---sh-->
./kev
```
Then run the client with a single command line argument which is
the name of the machine running the server, e.g.
```sh
```<!---sh-->
./kev localhost
```
@@ -169,7 +169,7 @@ blocked by a firewall.
Here's a good quick example to see it in action on your own
machine, assuming you have `Xwindows`:
```sh
```<!---sh-->
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&
```
+19 -19
View File
@@ -141,7 +141,7 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make</code></pre>
<p>There is another version which lets you use the arrow keys rather than the more
awkward <code>,</code> and <code>.</code> keys. See <a href="#alternate-code">alternate code</a> below.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -149,35 +149,35 @@ awkward <code>,</code> and <code>.</code> keys. See <a href="#alternate-code">al
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2001_kev">2001 kev bugs</a>.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span> <span class="co"># in one terminal</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span> hostname <span class="co"># in another terminal</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./kev # in one terminal
./kev hostname # in another terminal</code></pre>
<p>NOTE: each player’s paddle is at the bottom and the opponent at the top.</p>
<h2 id="try">Try:</h2>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span> <span class="co"># in one terminal</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span> localhost <span class="co"># in another terminal on the same host</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./kev # in one terminal
./kev localhost # in another terminal on the same host</code></pre>
<p>If you need to change the speed you can reconfigure it like (say
for over a network and not the same host):</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber SPEED=50 all <span class="co"># original default value which is very fast</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make clobber SPEED=50 all # original default value which is very fast</code></pre>
<p>If you wish to change the port you can do so like:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber PORT=3773 all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make clobber PORT=3773 all</code></pre>
<p>Of course if you want a port &lt; 1024 you’ll need to be root so don’t do that.</p>
<p>And if you know what you’re doing you can redefine the call to the <code>socket(2)</code>
syscall with the <code>l_</code> macro, changing the <code>L</code> variable like one would <code>PORT</code>. Of
course you can do more than one at the same time. For instance to change the
speed and port:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber SPEED=512 PORT=3773 all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make clobber SPEED=512 PORT=3773 all</code></pre>
<p>If you have <code>xterm</code> try on one system:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev <span class="kw">&amp;</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &amp;</code></pre>
<p>and then the other, the client system:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev localhost<span class="kw">&amp;</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&amp;</code></pre>
<p>This might look nicer than just the terminal itself.</p>
<h2 id="alternate-code">Alternate code:</h2>
<p>This version allows you to use arrow keys on the keyboard rather than the more
awkward <code>,</code> and <code>.</code> keys to move your paddle.</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<p>You can reconfigure the macros described above in the same way.</p>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>kev.alt</code> as you would <code>kev</code>.</p>
@@ -185,9 +185,9 @@ awkward <code>,</code> and <code>.</code> keys to move your paddle.</p>
terminal?</p>
<h3 id="alternate-try">Alternate try:</h3>
<p>If you have <code>xterm</code> try on one system:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev.alt <span class="kw">&amp;</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt &amp;</code></pre>
<p>and then the other, the client system:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev.alt localhost<span class="kw">&amp;</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev.alt localhost&amp;</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Continuing with this year’s “retro game” theme, this is another old game;
arguably, one of the oldest. Requires a functioning network, and curses.</p>
@@ -212,17 +212,17 @@ speeds. Each player has a paddle to hit the ball, and you get points for
getting the ball past your opponent’s paddle. It’s pretty fun! :)</p>
<h3 id="running">RUNNING</h3>
<p>Run the server first without any command line arguments, i.e.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./kev</code></pre>
<p>Then run the client with a single command line argument which is
the name of the machine running the server, e.g.</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./kev</span> localhost</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./kev localhost</code></pre>
<p>Make sure that the terminals on both ends are the same size. Also, the TCP port
number (by default 5455) specified in the <a href="Makefile">Makefile</a> mustn’t be
blocked by a firewall.</p>
<p>Here’s a good quick example to see it in action on your own
machine, assuming you have <code>Xwindows</code>:</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev <span class="kw">&amp;</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">xterm</span> <span class="at">-geometry</span> 80x40 <span class="at">-fg</span> green <span class="at">-bg</span> black <span class="at">-fn</span> 9x15bold <span class="at">-e</span> ./kev localhost<span class="kw">&amp;</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev &amp;
xterm -geometry 80x40 -fg green -bg black -fn 9x15bold -e ./kev localhost&amp;</code></pre>
<h3 id="playing">PLAYING</h3>
<p>Your paddle is the one at the bottom of the screen, your opponent
is at the top. To move your paddle left, hold down <code>,</code> (i.e. <code>&lt;</code>