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

+5 -5
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make
```
@@ -11,14 +11,14 @@ tested with Windows. See [alternate code](#alternate-code) below.
## To use:
```sh
```<!---sh-->
./toledo3 [1 | 2 | 3 [b]]
```
## Try:
```sh
```<!---sh-->
./toledo3 1
```
@@ -62,7 +62,7 @@ So I managed to do a graphical X11 chess program ('`WYSIAIE`', or 'What You See
Is An IOCCC Entry'). Pointing and clicking to move pieces is the only required
action, and of course the command-line options:
```sh
```<!---sh-->
./toledo3 # Two-players mode (useful if you don't have a board at hand)
./toledo3 1 # Human white - Computer black, level 1 (fast)
./toledo3 2 # Human white - Computer black, level 2 (medium)
@@ -97,7 +97,7 @@ number generator.
Because it is resource-hungry, I strongly recommend to compile it
using maximum optimization. With GCC you can use:
```sh
```<!---sh-->
gcc -O3 -fexpensive-optimizations prog.c -o prog -lX11
```
+11 -11
View File
@@ -141,14 +141,14 @@ Location: <a href="../../location.html#MX">MX</a> - <em>United Mexican States</e
<!-- 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>The author provided two alternate versions, one which adds a status bar and
another that makes it text only. The author also provided a version that they
tested with Windows. See <a href="#alternate-code">alternate 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">./toledo3</span> [1 <span class="kw">|</span> <span class="ex">2</span> <span class="kw">|</span> <span class="ex">3</span> <span class="pp">[</span><span class="ss">b</span><span class="pp">]</span>]</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./toledo3 [1 | 2 | 3 [b]]</code></pre>
<h2 id="try">Try:</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">./toledo3</span> 1</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./toledo3 1</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>The author provided two additional versions, <a href="toledo3-sbar.c">toledo3-sbar.c</a>
and <a href="toledo3-txt.c">toledo3-txt.c</a>. Respectively these create a status bar and
@@ -172,13 +172,13 @@ the code for Deep Blue.</p>
<p>So I managed to do a graphical X11 chess program (‘<code>WYSIAIE</code>’, or ‘What You See
Is An IOCCC Entry’). Pointing and clicking to move pieces is the only required
action, and of course the command-line options:</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">./toledo3</span> <span class="co"># Two-players mode (useful if you don&#39;t have a board at hand)</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 1 <span class="co"># Human white - Computer black, level 1 (fast)</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 2 <span class="co"># Human white - Computer black, level 2 (medium)</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 3 <span class="co"># Human white - Computer black, level 3 (slow)</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 1 b <span class="co"># Human black - Computer white, level 1 (fast)</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 2 b <span class="co"># Human black - Computer white, level 2 (medium)</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">./toledo3</span> 3 b <span class="co"># Human black - Computer white, level 3 (slow)</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./toledo3 # Two-players mode (useful if you don&#39;t have a board at hand)
./toledo3 1 # Human white - Computer black, level 1 (fast)
./toledo3 2 # Human white - Computer black, level 2 (medium)
./toledo3 3 # Human white - Computer black, level 3 (slow)
./toledo3 1 b # Human black - Computer white, level 1 (fast)
./toledo3 2 b # Human black - Computer white, level 2 (medium)
./toledo3 3 b # Human black - Computer white, level 3 (slow)</code></pre>
<p>The computer will check that your moves are legal. Full legal
chess moves are allowed, except minor promotions on human side.</p>
<p>The game will continue up to its logical conclusion, you make
@@ -196,7 +196,7 @@ optimizations use valuable IOCCC characters.</p>
number generator.</p>
<p>Because it is resource-hungry, I strongly recommend to compile it
using maximum optimization. With GCC you can use:</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">gcc</span> <span class="at">-O3</span> <span class="at">-fexpensive-optimizations</span> prog.c <span class="at">-o</span> prog <span class="at">-lX11</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc -O3 -fexpensive-optimizations prog.c -o prog -lX11</code></pre>
<h3 id="known-features">KNOWN “FEATURES”</h3>
<ol type="1">
<li><p>Because this is my second X11 program (the first was