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
+11
-11
@@ -1,6 +1,6 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -18,14 +18,14 @@ For more detailed information see [2019 lynn bugs](../../bugs.html#2019_lynn).
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./prog
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -62,7 +62,7 @@ typeclasses. Just pass dictionaries explicitly.
|
||||
|
||||
Build the compiler:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
cc -o prog prog.c
|
||||
```
|
||||
|
||||
@@ -72,7 +72,7 @@ Build the compiler:
|
||||
|
||||
Test the compiler on [fib.hs](fib.hs):
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
(./prog < fib.hs ; cat prog.c) > fib.c
|
||||
```
|
||||
|
||||
@@ -81,7 +81,7 @@ Compiling the output produces a binary that prints the 30th Fibonacci number.
|
||||
The file [ghcfib.hs](ghcfib.hs) includes [fib.hs](fib.hs) with some glue code,
|
||||
and shows GHC also accepts our subset of Haskell:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
ghc ghcfib.hs
|
||||
```
|
||||
|
||||
@@ -93,7 +93,7 @@ instead provide [hint.hs](hint.hs), the output of a certain stage of the
|
||||
compiler when run on itself. This intermediate output is hopefully difficult to
|
||||
understand, yet is accepted by our compiler:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
(./prog < hint.hs ; cat prog.c) > hint.c
|
||||
make hint
|
||||
./hint
|
||||
@@ -116,7 +116,7 @@ languages"](https://www.cs.dartmouth.edu/~doug/nfa.pdf). We exercise it by
|
||||
showing the first entries of the length-ordered list of all strings consisting
|
||||
of the characters `a` and `b` that contain an even number of `a`s.
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
(./prog < lol.hs ; cat prog.c) > lol.c
|
||||
make lol
|
||||
./lol
|
||||
@@ -124,7 +124,7 @@ of the characters `a` and `b` that contain an even number of `a`s.
|
||||
|
||||
A GHC wrapper is provided:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
ghc ghclol.hs
|
||||
```
|
||||
|
||||
@@ -135,14 +135,14 @@ See [scc.hs](scc.hs) (and its GHC wrapper [ghcscc.hs](ghcscc.hs)) for an elegant
|
||||
way to print the strongly-connected components of a graph in reverse topological
|
||||
order.
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
(./prog < scc.hs ; cat prog.c) > scc.c
|
||||
```
|
||||
|
||||
It expects the input to be in a similar format as a previous entry
|
||||
(2018 vokes). For example:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make scc
|
||||
./scc < example-1.txt
|
||||
./scc < example-2.txt
|
||||
|
||||
Reference in new issue
Block a user