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

+6 -6
View File
@@ -144,7 +144,7 @@ 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> all</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make all</code></pre>
<p>The authors provided a spoiler version, originally uuencoded but uudecoded by us
in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
@@ -152,16 +152,16 @@ in 2023. See <a href="#alternate-code">Alternate code</a> below.</p>
<pre><code> STATUS: missing file - please provide it</code></pre>
<p>For more detailed information see <a href="../../bugs.html#1995_vanschnitz">1995 vanschnitz 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="ex">./vanschnitz</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./vanschnitz</code></pre>
<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="ex">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="alternate-code">Alternate code:</h2>
<p>The authors provided a spoiler version of the program. Originally uuencoded we
have decoded it for the wider audience in <a href="vanschnitz.alt.c">vanschnitz.alt.c</a>. The
<code>uuencode</code>d blob is still available in their remarks below. They encourage you
to first try and figure out the program without the spoiler.</p>
<h3 id="alternate-build">Alternate 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> alt</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make alt</code></pre>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>vanschnitz.alt</code> as you would <code>vanschnitz</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -187,7 +187,7 @@ for. This is done by defining the symbol <code>n</code> on the compile
line. For instance, to cause the compiler to solve the Towers
of Hanoi problem with four disks, you would compile the program
like this:</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">gcc</span> hanoi.c <span class="at">-o</span> hanoi <span class="at">-Dn</span><span class="op">=</span>4</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc hanoi.c -o hanoi -Dn=4</code></pre>
<p>A default value of <code>5</code> will be used for <code>n</code> if you do not define
it on the command line. The value of <code>n</code> cannot be greater than
fifteen (the compiler we used to test has a limit on the <code>#include</code>
@@ -208,7 +208,7 @@ ANSI C feature in which adjacent character strings are
concatenated; a version that does not use this feature has been
included for people who can only run K&amp;R). A good way to see
the resulting program (on a Unix system) is to do the command</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="fu">gcc</span> hanoi.c <span class="at">-E</span> <span class="at">-Dn</span><span class="op">=</span>5 <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-v</span> <span class="dt">\#</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-v</span> ^<span class="dt">\$</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> gcc hanoi.c -E -Dn=5 | grep -v \# | grep -v ^\$</code></pre>
<p>For an odd number of disks, the program will provide a
solution wherein the disks end up on peg 2; for an even
number of disks, they will end on peg 3. This should