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
```
@@ -16,7 +16,7 @@ looked like back in 2000 (with a configurable speed). See the
## To use:
```sh
```<!---sh-->
./thadgavin.alt
```
@@ -27,7 +27,7 @@ You can press 'q' at any time to exit.
If you have SDL1 installed:
```sh
```<!---sh-->
./thadgavin_sdl
```
@@ -43,13 +43,13 @@ microseconds) for the SDL version.
To change the SDL one to something like `15000` you can do:
```sh
```<!---sh-->
make SDL_SLEEP=15000 clobber alt
```
and to change the curses one to `40`:
```sh
```<!---sh-->
make SLEEP=40 clobber alt
```
@@ -75,14 +75,14 @@ is not a problem there.
### Original build:
```sh
```<!---sh-->
make all
```
### Original use:
```sh
```<!---sh-->
./thadgavin
```
@@ -91,7 +91,7 @@ is not a problem there.
If you have SDL1 installed:
```sh
```<!---sh-->
./thadgavin_sdl
```
@@ -110,14 +110,14 @@ less than dazzling. We could not test this entry in DOS mode.
Compile using DJGPP as follows:
```sh
```<!---sh-->
gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math
```
### To use under Windows, X-Windows or macOS using the Simple DirectMedia Layer:
```sh
```<!---sh-->
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm
```
@@ -125,7 +125,7 @@ Compile using DJGPP as follows:
### To use curses:
```sh
```<!---sh-->
gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm
```
+11 -11
View File
@@ -144,7 +144,7 @@ Location: <a href="../../location.html#GB">GB</a> - <em>United Kingdom of Great
<!-- 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>NOTE: if you don’t have curses or SDL1 installed both modes will fail to compile. In
that case see the <a href="../../faq.html#SDL">FAQ 3.8 - How do I compile an IOCCC entry that requires SDL1
or SDL2?</a> and <a href="../../faq.html#curses">FAQ 3.9 - How do I compile an IOCCC entry that
@@ -153,11 +153,11 @@ requires (n)curses?</a> for more information.</p>
looked like back in 2000 (with a configurable speed). See the
<a href="#original-code">original code</a> section for the original entry.</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">./thadgavin.alt</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./thadgavin.alt</code></pre>
<p>You can press ‘q’ at any time to exit.</p>
<h2 id="try">Try:</h2>
<p>If you have SDL1 installed:</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="ex">./thadgavin_sdl</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./thadgavin_sdl</code></pre>
<p>Whereas the curses version has an early exit the SDL version does not. You will
have to kill it yourself.</p>
<p>You might also wish to reconfigure the speed at which the programs run. The code
@@ -167,9 +167,9 @@ redefine the values: <code>SLEEP</code> is how long the program sleeps (in micro
between output with curses and <code>SDL_SLEEP</code> is how long it sleeps (also in
microseconds) for the SDL version.</p>
<p>To change the SDL one to something like <code>15000</code> you can do:</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="fu">make</span> SDL_SLEEP=15000 clobber alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make SDL_SLEEP=15000 clobber alt</code></pre>
<p>and to change the curses one to <code>40</code>:</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> SLEEP=40 clobber alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make SLEEP=40 clobber alt</code></pre>
<p>Then use the program(s) in the same way.</p>
<p>The different macros is because the curses version is already much slower and so
it’s better to not tie the two values together. You may of course redefine both
@@ -184,12 +184,12 @@ typically ctrl-c) as the program does not call <code>endwin()</code>. Using <cod
clear the screen. The alt code, as noted above, allows one to quit early so this
is not a problem there.</p>
<h3 id="original-build">Original build:</h3>
<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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<h3 id="original-use">Original use:</h3>
<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">./thadgavin</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./thadgavin</code></pre>
<h3 id="original-try">Original try:</h3>
<p>If you have SDL1 installed:</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">./thadgavin_sdl</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./thadgavin_sdl</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>This entry is a nice play by the rules. It can use curses, if the
SDL graphic library is not present, and is quite good at that,
@@ -198,11 +198,11 @@ less than dazzling. We could not test this entry in DOS mode.</p>
<h2 id="authors-remarks">Authors’ remarks:</h2>
<h3 id="to-use-under-dos">To use under DOS:</h3>
<p>Compile using DJGPP as follows:</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">gcc</span> thadgavin.c <span class="at">-o</span> thadgavin.exe <span class="at">-Wall</span> <span class="at">-lm</span> <span class="at">-O6</span> <span class="at">-mpentium</span> <span class="at">-fomit-frame-pointer</span> <span class="at">-ffast-math</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc thadgavin.c -o thadgavin.exe -Wall -lm -O6 -mpentium -fomit-frame-pointer -ffast-math</code></pre>
<h3 id="to-use-under-windows-x-windows-or-macos-using-the-simple-directmedia-layer">To use under Windows, X-Windows or macOS using the Simple DirectMedia Layer:</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">gcc</span> <span class="at">-O6</span> <span class="at">-lpthread</span> <span class="at">-g</span> <span class="at">-o</span> thadgavin thadgavin.c <span class="at">-lSDL</span> <span class="at">-DSDL</span> <span class="at">-lm</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lSDL -DSDL -lm</code></pre>
<h3 id="to-use-curses">To use curses:</h3>
<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">gcc</span> <span class="at">-O6</span> <span class="at">-lpthread</span> <span class="at">-g</span> <span class="at">-o</span> thadgavin thadgavin.c <span class="at">-lncurses</span> <span class="at">-lm</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc -O6 -lpthread -g -o thadgavin thadgavin.c -lncurses -lm</code></pre>
<h3 id="warnings">Warnings</h3>
<p>In gcc you might get the following warning:</p>
<pre><code> thadgavin.c.c:46: warning: passing arg 2 of `SDL_SetColors&#39; from incompatible pointer type</code></pre>