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
|
||||
```
|
||||
|
||||
@@ -10,7 +10,7 @@ code](#alternate-code) below.
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./prog > lena.ppm
|
||||
```
|
||||
|
||||
@@ -21,7 +21,7 @@ First open [Lenna.png](Lenna.png) in your graphics viewer of choice. Next, after
|
||||
running the above command (`./prog > lena.ppm`), open `lena.ppm` in your
|
||||
graphics viewer of choice. After that try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -44,7 +44,7 @@ for Windows.
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -99,7 +99,7 @@ Although the program was optimized to decompress its built-in image,
|
||||
it accepts to decompress image files from its standard
|
||||
input. Examples:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./prog d < lena512.bin > lena512.ppm
|
||||
./prog d < fruits.bin > fruits.ppm
|
||||
./prog d < vintage_cars.bin > vintage_cars.ppm
|
||||
|
||||
@@ -141,16 +141,16 @@ 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="<!---sh-->"><code> make</code></pre>
|
||||
<p>There is an alternate version that should work with Windows. See <a href="#alternate-code">Alternate
|
||||
code</a> below.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<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">./prog</span> <span class="op">></span> lena.ppm</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./prog > lena.ppm</code></pre>
|
||||
<h2 id="try">Try:</h2>
|
||||
<p>First open <a href="Lenna.png">Lenna.png</a> in your graphics viewer of choice. Next, after
|
||||
running the above command (<code>./prog > lena.ppm</code>), open <code>lena.ppm</code> in your
|
||||
graphics viewer of choice. After that try:</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="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<p>NOTE: the script uses the tools <code>pngtopam(1)</code> (or <code>pngtopnm(1)</code> for older
|
||||
versions) and <code>pnmscale</code> come from the netpbm project and <code>cjpeg(1)</code> comes from
|
||||
<code>libjpeg-turbo</code>. If you don’t have these tools already see <a href="../../faq.html#netpbm">FAQ 3.15 - How do I
|
||||
@@ -163,7 +163,7 @@ it?</a>.</p>
|
||||
<p>The <a href="prog.alt.c">prog.alt.c</a> is based on the author’s remarks and it should work
|
||||
for Windows.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<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">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>prog.alt</code> as you would <code>prog</code>.</p>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
@@ -200,9 +200,9 @@ as the algorithms already have a significant complexity.</p>
|
||||
<p>Although the program was optimized to decompress its built-in image,
|
||||
it accepts to decompress image files from its standard
|
||||
input. Examples:</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">./prog</span> d <span class="op"><</span> lena512.bin <span class="op">></span> lena512.ppm</span>
|
||||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> d <span class="op"><</span> fruits.bin <span class="op">></span> fruits.ppm</span>
|
||||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> d <span class="op"><</span> vintage_cars.bin <span class="op">></span> vintage_cars.ppm</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./prog d < lena512.bin > lena512.ppm
|
||||
./prog d < fruits.bin > fruits.ppm
|
||||
./prog d < vintage_cars.bin > vintage_cars.ppm</code></pre>
|
||||
<p>The original images for <a href="https://commons.wikimedia.org/wiki/File%3AFruits_oranges%2C_jardin_japonais_2.JPG">fruits</a> and <a href="https://commons.wikimedia.org/wiki/File%3ARed_Bull_Jungfrau_Stafette%2C_10th_stage_-_vintage_cars_%282%29.jpg">vintage cars</a> come from
|
||||
Wikipedia and were resized to a width of 1024 pixels.</p>
|
||||
<p>The program should be portable on any Unix system. On Windows the line
|
||||
|
||||
Reference in new issue
Block a user