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

+23 -23
View File
@@ -141,14 +141,14 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
<!-- 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>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2020_ferguson1">2020 ferguson1 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="va">WAIT</span><span class="op">=</span>N <span class="va">WALLS</span><span class="op">=</span><span class="pp">[</span><span class="ss">01</span><span class="pp">]</span> <span class="va">EVADE</span><span class="op">=</span>N <span class="va">SIZE</span><span class="op">=</span>N <span class="va">MAXSIZE</span><span class="op">=</span>N <span class="va">GROW</span><span class="op">=</span>N <span class="va">SHEDS</span><span class="op">=</span>N <span class="va">SHED</span><span class="op">=</span>N <span class="va">CANNIBAL</span><span class="op">=</span><span class="pp">[</span><span class="ss">01</span><span class="pp">]</span> <span class="ex">./prog</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># start pressing some arrow keys</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> WAIT=N WALLS=[01] EVADE=N SIZE=N MAXSIZE=N GROW=N SHEDS=N SHED=N CANNIBAL=[01] ./prog
# start pressing some arrow keys</code></pre>
<p>where <code>N</code> is a number and <code>[01]</code> is either <code>1</code> or <code>0</code> (or more correctly zero
and non-zero).</p>
<h3 id="variables">Variables:</h3>
@@ -202,25 +202,25 @@ whether you can go through the Snake or not. Default is 0
(cannot - die if you try).</p></li>
</ul>
<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="fu">make</span> test</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="va">WAIT</span><span class="op">=</span>75 <span class="va">WALLS</span><span class="op">=</span>1 <span class="va">CANNIBAL</span><span class="op">=</span>1 <span class="ex">./prog</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> <span class="va">SIZE</span><span class="op">=</span>-1 <span class="ex">./prog</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a> <span class="va">CANNIBAL</span><span class="op">=</span>1 <span class="va">WALLS</span><span class="op">=</span>1 <span class="va">WAIT</span><span class="op">=</span>50 <span class="va">EVADE</span><span class="op">=</span>200 <span class="ex">./prog</span></span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> <span class="va">WAIT</span><span class="op">=</span>75 <span class="va">GROW</span><span class="op">=</span>-1 <span class="va">SIZE</span><span class="op">=</span>5 <span class="va">CANNIBAL</span><span class="op">=</span>1 <span class="ex">./prog</span></span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a> <span class="va">CANNIBAL</span><span class="op">=</span>1 <span class="va">WALLS</span><span class="op">=</span>1 <span class="va">WAIT</span><span class="op">=</span>0 <span class="va">EVADE</span><span class="op">=</span>1 <span class="va">MAXSIZE</span><span class="op">=</span>10 <span class="ex">./prog</span></span>
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a> <span class="ex">./play</span></span>
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a> <span class="co"># allows you to configure colours and has various pre-configured gameplay modes</span></span>
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a> <span class="ex">./snake-colours</span></span>
<span id="cb4-19"><a href="#cb4-19" aria-hidden="true" tabindex="-1"></a> <span class="co"># allows for configuring colours</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make test
WAIT=75 WALLS=1 CANNIBAL=1 ./prog
./prog
SIZE=-1 ./prog
CANNIBAL=1 WALLS=1 WAIT=50 EVADE=200 ./prog
WAIT=75 GROW=-1 SIZE=5 CANNIBAL=1 ./prog
CANNIBAL=1 WALLS=1 WAIT=0 EVADE=1 MAXSIZE=10 ./prog
./play
# allows you to configure colours and has various pre-configured gameplay modes
./snake-colours
# allows for configuring colours</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>As the <a href="https://en.wikipedia.org/wiki/Gadsden_flag">Gadsden flag</a> warns, beware of the snake!
This game has a number of configurable pitfalls including walls and snakes.</p>
@@ -306,7 +306,7 @@ look like bugs but aren’t as well as documenting a built-in test unit for some
features.</p>
<p>Because all IOCCC entries should have a man page I have included one (even
though much of it is what’s also above). To render try:</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">man</span> ./snake.1</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> man ./snake.1</code></pre>
<p>The <a href="COMPILING.html">COMPILING.html</a> file has a few portability
notes and the <a href="HACKING.html">HACKING.html</a> file has some
information on how one might modify things, things that could be implemented