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="<!---c-->"><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:
1 parent
3919df50fb
commit
b66c79254a
700 files changed
+7052
-7056
No files matched your search
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,7 +18,7 @@ For more detailed information see [2020 giles bugs](../../bugs.html#2020_giles).
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./prog < dtmf.wav
|
||||
|
||||
./prog [digits] > digits.wav
|
||||
@@ -33,7 +33,7 @@ will be converted to the DTMF sound!
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
./prog < pi.wav
|
||||
|
||||
@@ -71,7 +71,7 @@ exactly 16 bits per sample, but it allows any sample rate and any number of
|
||||
audio channels.
|
||||
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
$ ./prog < pi.wav
|
||||
31415926
|
||||
```
|
||||
@@ -80,7 +80,7 @@ If the program is executed with a command-line argument, it will generate the
|
||||
tones corresponding to the specified characters, writing them to standard output
|
||||
as a WAV file.
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
$ ./prog 867-5309 | aplay
|
||||
```
|
||||
|
||||
|
||||
+12
-12
@@ -141,26 +141,26 @@ Location: <a href="../../location.html#AU">AU</a> - <em>Commonwealth of Australi
|
||||
<!-- 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="<!---sh-->"><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#2020_giles">2020 giles 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">./prog</span> <span class="op"><</span> dtmf.wav</span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> <span class="pp">[</span><span class="ss">digits</span><span class="pp">]</span> <span class="op">></span> digits.wav</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./prog < dtmf.wav
|
||||
|
||||
./prog [digits] > digits.wav</code></pre>
|
||||
<p>where <code>dtmf.wav</code> is a WAV file of the dialling of a number being dialled with
|
||||
<a href="https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling">DTMF (Dual-tone multi
|
||||
frequency)</a>
|
||||
(more commonly known as Touch-Tone) and <code>[digits]</code> is a sequence of digits that
|
||||
will be converted to the DTMF sound!</p>
|
||||
<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>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> <span class="op"><</span> pi.wav</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="co"># See</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> 867-5309 <span class="op">></span> jenny.wav</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh
|
||||
./prog < pi.wav
|
||||
|
||||
# See
|
||||
./prog 867-5309 > jenny.wav</code></pre>
|
||||
<p>If the script <a href="try.sh">try.sh</a> did not play a WAV file, it means you do not have
|
||||
SoX installed; see <a href="../../faq.html#sox">FAQ 3.10: How do I compile and use an IOCCC entry that
|
||||
requires sound?</a>). In this case install it and try it again or
|
||||
@@ -180,12 +180,12 @@ standard input, decode the touch-tones in the file, and output the corresponding
|
||||
digits to standard output. This program only supports WAV files that have
|
||||
exactly 16 bits per sample, but it allows any sample rate and any number of
|
||||
audio channels.</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">$</span> ./prog <span class="op"><</span> pi.wav</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">31415926</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> $ ./prog < pi.wav
|
||||
31415926</code></pre>
|
||||
<p>If the program is executed with a command-line argument, it will generate the
|
||||
tones corresponding to the specified characters, writing them to standard output
|
||||
as a WAV file.</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">$</span> ./prog 867-5309 <span class="kw">|</span> <span class="fu">aplay</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> $ ./prog 867-5309 | aplay</code></pre>
|
||||
<h3 id="interesting-features">Interesting Features</h3>
|
||||
<ul>
|
||||
<li>When compiled with <code>gcc -pedantic -Wall -Wextra</code> there are no compiler
|
||||
|
||||
Reference in new issue
Block a user