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

+4 -4
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make
```
@@ -18,7 +18,7 @@ For more detailed information see [2001 schweikh bugs](../../bugs.html#2001_schw
## To use:
```sh
```<!---sh-->
./schweikh string string2
```
@@ -40,7 +40,7 @@ This is supposed to happen. As is written in the
## Try:
```sh
```<!---sh-->
./try.sh
```
@@ -64,7 +64,7 @@ pattern if you are looking for something in the middle.
You can use it for your shell scripting needs similar to a silent grep
(and without `stdout` redirected to `/dev/null`):
```sh
```<!---sh-->
if prog "${VARIABLE}" '<glob>'; then
echo VARIABLE matches
else
+8 -8
View File
@@ -141,13 +141,13 @@ Location: <a href="../../location.html#DE">DE</a> - <em>Federal Republic of Germ
<!-- 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>
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
<p>The current status of this entry is:</p>
<pre><code> STATUS: INABIAF - please **DO NOT** fix</code></pre>
<p>For more detailed information see <a href="../../bugs.html#2001_schweikh">2001 schweikh 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">./schweikh</span> string string2</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./schweikh string string2</code></pre>
<p>This program will very likely crash or do something else if you do not give it
two args.</p>
<p>Note also that the glob pattern must match the whole string. See the author’s
@@ -157,7 +157,7 @@ comments for details and a workaround.</p>
<a href="http://catb.org/jargon/html/F/feature.html">The Jargon File</a>:</p>
<pre><code> That&#39;s not a bug, that&#39;s a feature.</code></pre>
<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.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<h2 id="judges-remarks">Judges’ remarks:</h2>
<p>Do you get the pattern here?</p>
<h2 id="authors-remarks">Author’s remarks:</h2>
@@ -170,11 +170,11 @@ the whole string, so you may want to use <code>*</code> at the beginning and end
pattern if you are looking for something in the middle.</p>
<p>You can use it for your shell scripting needs similar to a silent grep
(and without <code>stdout</code> redirected to <code>/dev/null</code>):</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="cf">if</span> <span class="ex">prog</span> <span class="st">&quot;</span><span class="va">${VARIABLE}</span><span class="st">&quot;</span> <span class="st">&#39;&lt;glob&gt;&#39;</span><span class="kw">;</span> <span class="cf">then</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="bu">echo</span> VARIABLE matches</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="bu">echo</span> no match</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">fi</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> if prog &quot;${VARIABLE}&quot; &#39;&lt;glob&gt;&#39;; then
echo VARIABLE matches
else
echo no match
fi</code></pre>
<h3 id="bugs">Bugs</h3>
<p>There is no way to escape the meta characters. Dammit Jim, I’m a
one-liner, not a regexp lib.</p>