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
@@ -1,13 +1,13 @@
## To build:
```sh
```<!---sh-->
make
```
## To use:
```sh
```<!---sh-->
./vik2
```
@@ -127,7 +127,7 @@ speed up the compilation, define the `STOP` symbol to anything from `_3` to
`_10`. (The default value is `_10` which will make the compilation take some
time.) Prime numbers up to `2^STOP` will be calculated.
```sh
```<!---sh-->
cpp '-DSTOP=_5' '-DFNAME="tmp1.c"' prog.c tmp1.c
```
@@ -135,20 +135,20 @@ Then use `cpp` or any other
[pre-processor](https://en.wikipedia.org/wiki/C_preprocessor) to do the actual
work. This will take some time....
```sh
```<!---sh-->
cpp tmp1.c > tmp2.c
```
Finally compile the pre-processed file
```sh
```<!---sh-->
cc -O tmp2.c -o prog
```
Then run the program to reveal all prime numbers up to 32 (if you used
`STOP=_5` as above):
```sh
```<!---sh-->
./vik2
```
+6 -6
View File
@@ -141,9 +141,9 @@ 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></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> make</code></pre>
<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">./vik2</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./vik2</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>The fun thing about <a href="https://en.wikipedia.org/wiki/C_preprocessor">CPP</a> abuses
is that, in most cases, running the
@@ -234,16 +234,16 @@ symbol must be defined to the name of the output file. If you want to
speed up the compilation, define the <code>STOP</code> symbol to anything from <code>_3</code> to
<code>_10</code>. (The default value is <code>_10</code> which will make the compilation take some
time.) Prime numbers up to <code>2^STOP</code> will be calculated.</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">cpp</span> <span class="st">&#39;-DSTOP=_5&#39;</span> <span class="st">&#39;-DFNAME=&quot;tmp1.c&quot;&#39;</span> prog.c tmp1.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cpp &#39;-DSTOP=_5&#39; &#39;-DFNAME=&quot;tmp1.c&quot;&#39; prog.c tmp1.c</code></pre>
<p>Then use <code>cpp</code> or any other
<a href="https://en.wikipedia.org/wiki/C_preprocessor">pre-processor</a> to do the actual
work. This will take some time….</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">cpp</span> tmp1.c <span class="op">&gt;</span> tmp2.c</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cpp tmp1.c &gt; tmp2.c</code></pre>
<p>Finally compile the pre-processed file</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">cc</span> <span class="at">-O</span> tmp2.c <span class="at">-o</span> prog</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> cc -O tmp2.c -o prog</code></pre>
<p>Then run the program to reveal all prime numbers up to 32 (if you used
<code>STOP=_5</code> as above):</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="ex">./vik2</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./vik2</code></pre>
<h3 id="verification">Verification</h3>
<p>I wasn’t able to compile the full program which calculates <a href="https://en.wikipedia.org/wiki/Prime_number">prime
numbers</a> up to 1024 using GNU <code>cpp</code>