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
+14
-14
@@ -141,13 +141,13 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- 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>
|
||||
<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#1990_theorem">1990 theorem 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">./theorem</span> expression x1 x2 h y1</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./theorem expression x1 x2 h y1</code></pre>
|
||||
<p>where:</p>
|
||||
<pre><code> expression - function f(x,y) (see below)
|
||||
x1 - start of interval
|
||||
@@ -155,7 +155,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
h - step size
|
||||
y1 - initial value (y(x1) == y1)</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="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>The program’s source implements four functions, all from the
|
||||
same source file!</p>
|
||||
@@ -169,26 +169,26 @@ operators:</p>
|
||||
integer powers. Also note that all expressions are evaluated strictly
|
||||
left to right. (i.e., parenthesis aren’t supported).</p>
|
||||
<p>Try running the program with the following args:</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">./theorem</span> y 0 1 0.1 1</span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./theorem</span> 1/x 1 2 0.1 0</span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./theorem</span> <span class="st">'x^2/y+x'</span> 0 1 0.1 6</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./theorem y 0 1 0.1 1
|
||||
./theorem 1/x 1 2 0.1 0
|
||||
./theorem 'x^2/y+x' 0 1 0.1 6</code></pre>
|
||||
<p>But wait, there is more! You also get, free of charge, a
|
||||
reversing filter! Try:</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">./theorem</span> <span class="at">-r</span> 0 0 0 0 <span class="op"><</span> theorem.c <span class="op">></span> sorter.c</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./theorem -r 0 0 0 0 < theorem.c > sorter.c</code></pre>
|
||||
<p>Still not impressed? The author throws in for free, a
|
||||
sort program! Try:</p>
|
||||
<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="fu">make</span> sorter</span>
|
||||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">ls</span> <span class="kw">|</span> <span class="ex">./sorter</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make sorter
|
||||
ls | ./sorter</code></pre>
|
||||
<p>This program is safe for home use as well. The author has
|
||||
included a safety feature in case you misplace the original
|
||||
program source:</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="ex">./sorter</span> <span class="at">-r</span> 0 0 0 0 <span class="op"><</span> sorter.c <span class="op">></span> theorem_bkp.c</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./sorter -r 0 0 0 0 < sorter.c > theorem_bkp.c</code></pre>
|
||||
<p>And finally, as a special offer to users of this entry,
|
||||
the author provides a Fibonacci sequence generator! Try:</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">./sorter</span> 0 0 0 0 <span class="op"><</span> theorem.c <span class="op">></span> fibonacci.c</span>
|
||||
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> fibonacci</span>
|
||||
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./fibonacci</span> 1 1</span>
|
||||
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./fibonacci</span> 2 1</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./sorter 0 0 0 0 < theorem.c > fibonacci.c
|
||||
make fibonacci
|
||||
./fibonacci 1 1
|
||||
./fibonacci 2 1</code></pre>
|
||||
<p>NOTE: if the two args passed to <code>fibonacci</code> and <code>theorem_bkp</code> add to 0 it will
|
||||
print 0 over and over again in an infinite loop. In this case it should not be
|
||||
fixed (another condition where this occurred was fixed in 2023 as it affected
|
||||
|
||||
Reference in new issue
Block a user