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

+33 -33
View File
@@ -141,19 +141,19 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
<!-- 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 to get a better idea of
what this entry looked like back in 1993. The alternate version sleeps (via
<code>usleep(3)</code>) in between writes, defaulting at 1000 microseconds (but
reconfigurable). If you wish to see the original entry then see <a href="#original-code">original
code</a> below.</p>
<p>If you wish to speed the entry up, say to 500 microseconds between writes, try:</p>
<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="fu">make</span> clobber SLEEP=500 alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make clobber SLEEP=500 alt</code></pre>
<p>Alternatively if you wish to slow it down, say to 1500 microseconds between
writes, try:</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">make</span> clobber SLEEP=1500 alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make clobber SLEEP=1500 alt</code></pre>
<h2 id="to-use">To use:</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">./plummer.alt</span> number arg</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./plummer.alt number arg</code></pre>
<p>where:</p>
<ul>
<li>number is a number (try 21701)</li>
@@ -163,43 +163,43 @@ writes, try:</p>
<a href="https://hitchhikers.fandom.com/wiki/Vogon">Vogons</a> build that <a href="https://hitchhikers.fandom.com/wiki/Bypass">hyperspace
bypass</a>.</p>
<h2 id="try">Try:</h2>
<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="ex">./try.alt.sh</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span> 21701</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a> <span class="va">SLEEP</span><span class="op">=</span>500 <span class="ex">./try.alt.sh</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a> <span class="va">SLEEP</span><span class="op">=</span>900 <span class="ex">./try.alt.sh</span> 789789789789789</span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span> 789789789</span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a> <span class="va">SLEEP</span><span class="op">=</span>400 <span class="ex">./try.alt.sh</span> 42424242424242</span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a> <span class="va">SLEEP</span><span class="op">=</span>1000 <span class="ex">./try.alt.sh</span> xyzzyzzyx</span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a> <span class="va">SLEEP</span><span class="op">=</span>1200 <span class="ex">./try.alt.sh</span> xyzzyzzyx 5555</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.alt.sh
./try.alt.sh 21701
SLEEP=500 ./try.alt.sh
SLEEP=900 ./try.alt.sh 789789789789789
./try.alt.sh 789789789
SLEEP=400 ./try.alt.sh 42424242424242
SLEEP=1000 ./try.alt.sh xyzzyzzyx
SLEEP=1200 ./try.alt.sh xyzzyzzyx 5555</code></pre>
<h2 id="original-code">Original code:</h2>
<p>This version, the original, does not sleep in between writes, and is thus much
faster (depending on the <code>SLEEP</code> parameter specified in the build of <code>alt</code>, of
course).</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>
<p>Use <code>plummer</code> as you would <code>plummer.alt</code> above.</p>
<h3 id="original-try">Original try:</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">./try.sh</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> 21701</span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> 789789789789789</span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> 789789789</span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> 42424242424242</span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> xyzzyzzyx</span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> xyzzyzzyx 5555</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh
./try.sh 21701
./try.sh 789789789789789
./try.sh 789789789
./try.sh 42424242424242
./try.sh xyzzyzzyx
./try.sh xyzzyzzyx 5555</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>For extra credit: What happens when ‘number’ contains non-numeric
characters, and why?</p>