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

+7 -7
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make
```
@@ -18,14 +18,14 @@ For more detailed information see [2012 deckmyn bugs](../../bugs.html#2012_deckm
## To use:
```sh
```<!---sh-->
./deckmyn "$(cat deckmyn.c)" "$(cat musicfile.txt)" > sheetmusic.pbm
```
## Try:
```sh
```<!---sh-->
./try.sh
```
@@ -59,13 +59,13 @@ You need the source code and example input (either one of the example files, or
manual input as below) ready and a program capable of showing [.pbm bitmap
format](https://en.wikipedia.org/wiki/Netpbm) images.
```sh
```<!---sh-->
./deckmyn "`cat deckmyn.c`" "`cat example_greensleeves`" > greensleeves.pbm
```
If you have macOS you can open the image like:
```sh
```<!---sh-->
open greensleeves.pbm
```
@@ -73,13 +73,13 @@ If you have macOS you can open the image like:
normally open an image.
```sh
```<!---sh-->
./deckmyn "`cat deckmyn.c`" "KF m44c4 c4 g4 g4 : a4 a4 g2 :; " > short_bass.pbm
```
If you have macOS you can open the image like:
```sh
```<!---sh-->
open short_bass.pbm
```
+2 -2
View File
@@ -124,7 +124,7 @@
<h1 id="user-manual">USER MANUAL</h1>
<h2 id="calling-the-program">Calling the program</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="ex">./deckmyn</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> deckmyn.c<span class="kw">`</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> musicfile<span class="kw">`</span><span class="st">&quot;</span> <span class="op">&gt;</span> output.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat musicfile`&quot; &gt; output.pbm</code></pre>
<p>Then display <code>output.pbm</code>.</p>
<p>This minimalistic music notator expects two command line arguments. The first is
the font description embedded in the source code. Notice that you don’t pass the
@@ -186,7 +186,7 @@ clef. <code>"K"</code> followed by any other letter will just default to a stand
</ol>
<h2 id="examples">Examples</h2>
<p>Blank music paper (with G clef):</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="ex">./deckmyn</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> deckmyn.c<span class="kw">`</span><span class="st">&quot;</span> <span class="st">&quot;sz sa x s1 x s1 x s1 x s1 x s1 &quot;</span><span class="op">&gt;</span> blank.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;sz sa x s1 x s1 x s1 x s1 x s1 &quot;&gt; blank.pbm</code></pre>
<p>With an F clef:</p>
<pre><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF sz sa x s1 x s1 x s1 x s1 x s1 &quot;&gt; blank.pbm</code></pre>
<p>Notice how only the first staff (or any staff) needs to have the full length.</p>
+2 -2
View File
@@ -3,7 +3,7 @@
## Calling the program
```sh
```<!---sh-->
./deckmyn "`cat deckmyn.c`" "`cat musicfile`" > output.pbm
```
@@ -85,7 +85,7 @@ musical element of a line is only 2 characters!
Blank music paper (with G clef):
```sh
```<!---sh-->
./deckmyn "`cat deckmyn.c`" "sz sa x s1 x s1 x s1 x s1 x s1 "> blank.pbm
```
+7 -7
View File
@@ -141,15 +141,15 @@ Location: <a href="../../location.html#BE">BE</a> - <em>Kingdom of Belgium</em>
<!-- 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#2012_deckmyn">2012 deckmyn 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">./deckmyn</span> <span class="st">&quot;</span><span class="va">$(</span><span class="fu">cat</span> deckmyn.c<span class="va">)</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="va">$(</span><span class="fu">cat</span> musicfile.txt<span class="va">)</span><span class="st">&quot;</span> <span class="op">&gt;</span> sheetmusic.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;$(cat deckmyn.c)&quot; &quot;$(cat musicfile.txt)&quot; &gt; sheetmusic.pbm</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="judges-remarks">Judges’ remarks:</h2>
<p>The C of this entry is definitely sharp. The program cleverly uses its own
source at runtime to define the notes, time signature and accidental bitmaps.</p>
@@ -168,14 +168,14 @@ is not done in the author’s remarks, however.</p>
<p>You need the source code and example input (either one of the example files, or
manual input as below) ready and a program capable of showing <a href="https://en.wikipedia.org/wiki/Netpbm">.pbm bitmap
format</a> images.</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="ex">./deckmyn</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> deckmyn.c<span class="kw">`</span><span class="st">&quot;</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> example_greensleeves<span class="kw">`</span><span class="st">&quot;</span> <span class="op">&gt;</span> greensleeves.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;`cat example_greensleeves`&quot; &gt; greensleeves.pbm</code></pre>
<p>If you have macOS you can open the image like:</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">open</span> greensleeves.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> open greensleeves.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</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="ex">./deckmyn</span> <span class="st">&quot;</span><span class="kw">`</span><span class="fu">cat</span> deckmyn.c<span class="kw">`</span><span class="st">&quot;</span> <span class="st">&quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot;</span> <span class="op">&gt;</span> short_bass.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./deckmyn &quot;`cat deckmyn.c`&quot; &quot;KF m44c4 c4 g4 g4 : a4 a4 g2 :; &quot; &gt; short_bass.pbm</code></pre>
<p>If you have macOS you can open the image like:</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">open</span> short_bass.pbm</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> open short_bass.pbm</code></pre>
<p>… otherwise, you’ll have to open it in your viewer of choice how you would
normally open an image.</p>
<h3 id="description">Description</h3>