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 all
|
||||
```
|
||||
|
||||
@@ -13,13 +13,13 @@ code](#alternate-code) below for details.
|
||||
First, you must make sure that `first` is made first (even though `make all`
|
||||
should make first first :-) ):
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make first
|
||||
```
|
||||
|
||||
Second:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
# get help:
|
||||
echo help | cat third help.th - | ./first
|
||||
|
||||
@@ -29,7 +29,7 @@ Second:
|
||||
|
||||
Third:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
cat third help.th - | ./first
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ Fourth:
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ fix that the author notes in their remarks.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -75,7 +75,7 @@ Use `buzzard.2.alt` as you would `buzzard.2` above.
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -125,7 +125,7 @@ Do not expect to be able to do anything interesting with `first`.
|
||||
To do something interesting, you need to feed `first` the file
|
||||
[third](third) first. In unix, you can do
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
cat third help.th - | ./first
|
||||
```
|
||||
|
||||
@@ -226,7 +226,7 @@ When you get the `Ok.` message from `third`, try out some sample
|
||||
you in a normal way. It only prints `'Ok.'` after you define a word).
|
||||
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
2 3 + . cr
|
||||
```
|
||||
|
||||
|
||||
+13
-13
@@ -141,37 +141,37 @@ Location: <a href="../../location.html#ZZ">ZZ</a> - <em>Unknown location</em></l
|
||||
<!-- 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> all</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make all</code></pre>
|
||||
<p>There is an alternate version of this program. See <a href="#alternate-code">Alternate
|
||||
code</a> below for details.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<p>First, you must make sure that <code>first</code> is made first (even though <code>make all</code>
|
||||
should make first first :-) ):</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="fu">make</span> first</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make first</code></pre>
|
||||
<p>Second:</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="co"># get help:</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="bu">echo</span> help <span class="kw">|</span> <span class="fu">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <span class="co"># try out a demo:</span></span>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> third demo5.th <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> # get help:
|
||||
echo help | cat third help.th - | ./first
|
||||
|
||||
# try out a demo:
|
||||
cat third demo5.th | ./first</code></pre>
|
||||
<p>Third:</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">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> cat third help.th - | ./first</code></pre>
|
||||
<p>NOTE: Wait until ‘Ok’ is printed and the type:</p>
|
||||
<pre><code> 2 3 + . cr</code></pre>
|
||||
<p>Yes you should really type the 2 letters: <code>cr</code>.</p>
|
||||
<p>Fourth:</p>
|
||||
<pre><code> Sorry, this is third!</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<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">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate version, <a href="buzzard.2.alt.c">buzzard.2.alt.c</a>, does not contain a
|
||||
fix that the author notes in their remarks.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<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="fu">make</span> alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>buzzard.2.alt</code> as you would <code>buzzard.2</code> above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.alt.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>Have fun!</p>
|
||||
<h2 id="authors-remarks">Author’s remarks:</h2>
|
||||
@@ -204,7 +204,7 @@ included, but it only works on ASCII systems.</p>
|
||||
<p>Do not expect to be able to do anything interesting with <code>first</code>.</p>
|
||||
<p>To do something interesting, you need to feed <code>first</code> the file
|
||||
<a href="third">third</a> first. In unix, you can do</p>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> third help.th <span class="at">-</span> <span class="kw">|</span> <span class="ex">./first</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> cat third help.th - | ./first</code></pre>
|
||||
<p>to do this. Hopefully most operating systems will provide a way to do this. It
|
||||
may take some time for this to complete (I seem to remember it taking several
|
||||
minutes on an 8086 PC); <code>THIRD</code> will prompt you when it is finished. The file
|
||||
@@ -283,7 +283,7 @@ take a significant amount of time in THIRD.</p>
|
||||
<a href="https://en.wikipedia.org/wiki/Forth_(programming_language)">FORTH</a> code
|
||||
(<code>first</code> has no way of knowing if keyboard input is waiting, so it can’t actually prompt
|
||||
you in a normal way. It only prints <code>'Ok.'</code> after you define a word).</p>
|
||||
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">2</span> 3 + . cr</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> 2 3 + . cr</code></pre>
|
||||
<p>(which adds 2 and 3, and print the result and a newline.)</p>
|
||||
<p>THIRD responds:</p>
|
||||
<pre><code> 5</code></pre>
|
||||
|
||||
Reference in new issue
Block a user