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

+11 -11
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make alt
```
@@ -15,7 +15,7 @@ see [Original code](#original-code) below.
## To use:
```sh
```<!---sh-->
./westley.alt
```
@@ -39,14 +39,14 @@ from start to finish.
For something more interesting try compiling it with different `cc -D` arguments
and then run the program each time. For example:
```sh
```<!---sh-->
cc -Describe -Door westley.alt.c -o westley.alt && ./westley.alt
cc -Describe -Drain westley.alt.c -o westley.alt && ./westley.alt
```
To see the game from start to finish, try:
```sh
```<!---sh-->
./try.alt.sh
```
@@ -65,7 +65,7 @@ reason that we recommend you try it first.
### Original build:
```sh
```<!---sh-->
make all
```
@@ -95,14 +95,14 @@ error messages; there is no running the program.
For something more interesting try compiling it with different `cc -D`
arguments:
```sh
```<!---sh-->
cc -Describe -Door westley.c
cc -Describe -Drain westley.c
```
To see the game from start to complete, try:
```sh
```<!---sh-->
./try.sh
```
@@ -115,7 +115,7 @@ For spoilers see the end of the notes from the author below.
To use:
```sh
```<!---sh-->
./try.sh
```
@@ -131,7 +131,7 @@ This program is a simple adventure game which uses only C preprocessor
error messages (for missing `#include` files) as output. To begin,
try to compile the program with no options:
```sh
```<!---sh-->
cc westley.c
```
@@ -159,7 +159,7 @@ missing include file name, which functions as the game text.
To "do" things, all words must start with `-D`. For example, to
look at the door, do:
```sh
```<!---sh-->
cc -Describe -Door prog.c
```
@@ -176,7 +176,7 @@ Here is a walk-through for the game, including a few dead-ends:
### SPOILER
```sh
```<!---sh-->
cc -Describe -Door westley.c
cc -Describe -Drain westley.c
cc -Describe -Dwarf westley.c
+30 -30
View File
@@ -141,7 +141,7 @@ 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> alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<p>We recommend that you try the alternate version first as the original entry
requires (for better display) 80 columns and 8 character tabs with wraparound.</p>
<p>The alt code uses the same logic as the original code except that the original
@@ -149,7 +149,7 @@ code used <code>#include</code>s of files that do not exist to generate the mess
compiler errors) whereas the alt code uses <code>printf(3)</code>. For the original entry
see <a href="#original-code">Original code</a> below.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./westley.alt</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./westley.alt</code></pre>
<p>The purpose of the game is to escape the dungeon. Depending on the compiler line
you will get a different message when you run the program. One compiler line
will make you win the game (escape the dungeon) and others will show something
@@ -164,10 +164,10 @@ from start to finish.</p>
<h2 id="try">Try:</h2>
<p>For something more interesting try compiling it with different <code>cc -D</code> arguments
and then run the program each time. For example:</p>
<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="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&amp;&amp;</span> <span class="ex">./westley.alt</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.alt.c <span class="at">-o</span> westley.alt <span class="kw">&amp;&amp;</span> <span class="ex">./westley.alt</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc -Describe -Door westley.alt.c -o westley.alt &amp;&amp; ./westley.alt
cc -Describe -Drain westley.alt.c -o westley.alt &amp;&amp; ./westley.alt</code></pre>
<p>To see the game from start to finish, try:</p>
<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">./try.alt.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh</code></pre>
<h2 id="original-code">Original code:</h2>
<p>The purpose of the game is to escape the dungeon <strong>via the compiler line
where you get <em>messages as compiler errors</em></strong>. Depending on the compiler line you
@@ -177,7 +177,7 @@ game!</p>
wraparound. The alternate code does not have this limitation and it is for this
reason that we recommend you try it first.</p>
<h3 id="original-build">Original build:</h3>
<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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<p>There are a variety of different <code>-D</code> flags you can give to <code>cc</code> that change the
message you get. You might wish to look at the <a href="westley.c">source code</a> to get a
better idea or see below in the <a href="#original-try">Original try</a> section for
@@ -196,15 +196,15 @@ error messages; there is no running the program.</p>
<h3 id="original-try">Original try:</h3>
<p>For something more interesting try compiling it with different <code>cc -D</code>
arguments:</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">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc -Describe -Door westley.c
cc -Describe -Drain westley.c</code></pre>
<p>To see the game from start to complete, try:</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="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Not all compiler errors are bad.</p>
<p>For spoilers see the end of the notes from the author below.</p>
<p>To use:</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">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="authors-remarks">Author’s remarks:</h2>
<p>This program, in accordance with the rules, compiles into a legal
C program without human intervention. However, it simply compiles
@@ -213,7 +213,7 @@ to actually compile the program.</p>
<p>This program is a simple adventure game which uses only C preprocessor
error messages (for missing <code>#include</code> files) as output. To begin,
try to compile the program with no options:</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="fu">cc</span> westley.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc westley.c</code></pre>
<p>This will fail, producing an error message for a missing <code>#include</code>
file as the opening description. Your terminal should be set for
80 columns, 8 character tabs, and wraparound, as there is no way
@@ -232,7 +232,7 @@ to reliably output newlines. You should see something like this
missing include file name, which functions as the game text.</p>
<p>To “do” things, all words must start with <code>-D</code>. For example, to
look at the door, do:</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="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> prog.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc -Describe -Door prog.c</code></pre>
<p>…and you will get another error message telling you about the door.
(note: some compilers will stop after the first missing include file,
while others will continue to try compiling; the latter will repeat
@@ -241,24 +241,24 @@ with “verbose” turned on).</p>
<p>The goal of the game is to escape the dungeon.</p>
<p>Here is a walk-through for the game, including a few dead-ends:</p>
<h3 id="spoiler">SPOILER</h3>
<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="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Door</span> westley.c</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Drain</span> westley.c</span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dwarf</span> westley.c</span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Debris</span> westley.c <span class="co"># or -Dungeon</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Desk</span> westley.c</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Dime</span> westley.c</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Directory</span> westley.c</span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Dial</span> <span class="at">-DUNgeon0614</span> westley.c</span>
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drink</span> <span class="at">-Daiquiri</span> westley.c</span>
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Daiquiri</span> westley.c</span>
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Dwarf</span> <span class="at">-Daiquiri</span> westley.c <span class="co"># or -Drop -Down -Daiquiri</span></span>
<span id="cb12-12"><a href="#cb12-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Describe</span> <span class="at">-Document</span> westley.c</span>
<span id="cb12-13"><a href="#cb12-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dotted</span> <span class="at">-Dog</span> westley.c</span>
<span id="cb12-14"><a href="#cb12-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Depress</span> <span class="at">-Dalmatian</span> westley.c <span class="co"># also accepts &quot;Dalmation&quot; [sic]</span></span>
<span id="cb12-15"><a href="#cb12-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Deposit</span> <span class="at">-Dime</span> westley.c</span>
<span id="cb12-16"><a href="#cb12-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> westley.c</span>
<span id="cb12-17"><a href="#cb12-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">cc</span> <span class="at">-Drop</span> <span class="at">-Donut</span> <span class="at">-Down</span> <span class="at">-Drain</span> westley.c <span class="co"># or -Drop -Dwarf -Donut</span></span>
<span id="cb12-18"><a href="#cb12-18" aria-hidden="true" tabindex="-1"></a> <span class="co"># (at this point, you win!)</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc -Describe -Door westley.c
cc -Describe -Drain westley.c
cc -Describe -Dwarf westley.c
cc -Describe -Debris westley.c # or -Dungeon
cc -Describe -Desk westley.c
cc -Describe -Dime westley.c
cc -Describe -Directory westley.c
cc -Dial -DUNgeon0614 westley.c
cc -Drink -Daiquiri westley.c
cc -Drop -Daiquiri westley.c
cc -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
cc -Describe -Document westley.c
cc -Depress -Dotted -Dog westley.c
cc -Depress -Dalmatian westley.c # also accepts &quot;Dalmation&quot; [sic]
cc -Deposit -Dime westley.c
cc -Drop -Donut westley.c
cc -Drop -Donut -Down -Drain westley.c # or -Drop -Dwarf -Donut
# (at this point, you win!)</code></pre>
<p>Note that the game has no real state information; you can type these
commands in any order, at any time. Also note that word order is
unimportant.</p>