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

+5 -5
View File
@@ -1,6 +1,6 @@
## To build:
```sh
```<!---sh-->
make
```
@@ -15,20 +15,20 @@ require it?](../../faq.html#imagemagick).
Look here to find some [SVG Viewer
Implementations](https://www.w3.org/Graphics/SVG/WG/wiki/Implementations).
```sh
```<!---sh-->
./boutines < input > output.svg
```
## Try:
```sh
```<!---sh-->
./try.sh
```
If `ruby` is installed [try.sh](try.sh) will generate an SVG file by:
```sh
```<!---sh-->
ruby -e '20.times{puts "#{rand} #{rand}"}' | ./boutines > test.svg
```
@@ -75,7 +75,7 @@ an [SVG](https://www.w3.org/TR/SVG11/expanded-toc.html) stream.
This will possibly save a compressed SVG file and may be useful:
```sh
```<!---sh-->
./boutines | gzip > result.svg.gz
```
+5 -5
View File
@@ -141,7 +141,7 @@ Location: <a href="../../location.html#FR">FR</a> - <em>French Republic</em> (<e
<!-- 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>
<p>You will need an <a href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a> viewer or
a converter like <a href="https://imagemagick.org/index.php">ImageMagick</a>’s <code>convert</code>.
@@ -149,11 +149,11 @@ See <a href="../../faq.html#imagemagick">FAQ 3.17 - How do I compile and install
require it?</a>.</p>
<p>Look here to find some <a href="https://www.w3.org/Graphics/SVG/WG/wiki/Implementations">SVG Viewer
Implementations</a>.</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">./boutines</span> <span class="op">&lt;</span> input <span class="op">&gt;</span> output.svg</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./boutines &lt; input &gt; output.svg</code></pre>
<h2 id="try">Try:</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">./try.sh</span></span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./try.sh</code></pre>
<p>If <code>ruby</code> is installed <a href="try.sh">try.sh</a> will generate an SVG file by:</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="ex">ruby</span> <span class="at">-e</span> <span class="st">&#39;20.times{puts &quot;#{rand} #{rand}&quot;}&#39;</span> <span class="kw">|</span> <span class="ex">./boutines</span> <span class="op">&gt;</span> test.svg</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ruby -e &#39;20.times{puts &quot;#{rand} #{rand}&quot;}&#39; | ./boutines &gt; test.svg</code></pre>
<p>It will also create an SVG file with the file <a href="input.txt">input.txt</a>.</p>
<p>The script will check if <code>convert</code> is available and if so it will try converting
the SVG file(s) to PNG file(s) which you should be able to view in most any
@@ -178,7 +178,7 @@ square</a>.</p>
<p>A <a href="https://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi diagram</a> of the set as
an <a href="https://www.w3.org/TR/SVG11/expanded-toc.html">SVG</a> stream.</p>
<p>This will possibly save a compressed SVG file and may be useful:</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">./boutines</span> <span class="kw">|</span> <span class="fu">gzip</span> <span class="op">&gt;</span> result.svg.gz</span></code></pre></div>
<pre class="&lt;!---sh--&gt;"><code> ./boutines | gzip &gt; result.svg.gz</code></pre>
<p>Input consists of a list of floating points values separated by whitespaces
(ranging preferably in <code>[0,1]</code>). Alternating a horizontal coordinate, a
whitespace then the other coordinate (pointing downwards in the resulting