improve how markdown code language is commented
We added a space between the markdown triple code mark and language that was enclosed in HTML comments. So a line of the form: ```` ```<!---c---> ```` became: ```` ``` <!---c---> ```` This was done to **help** some code see that the HTML comment string was not a markdown code specifier. Not all code understands this after this changed. For example, `pandoc(1)` still forms HTML classes of the form "<!---c-->" when it encounters the above mentioned change. We also fixed a problem with `2019/dogon/README.md` regarding a markdown code block. We also fixed a problem with `2020/yang/README.md` regarding a markdown code block.
This commit is contained in:
1 parent
c549f6585e
commit
3ddbac9e6b
357 files changed
+2432
-2399
No files matched your search
@@ -1,13 +1,13 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dorssel
|
||||
# input some text
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ altering the behavior ?
|
||||
Try doing what the last part of the last command in [try.sh](try.sh) suggests.
|
||||
As in, do the following:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
echo ". -..- . .-. -.-. .. ... .
|
||||
-.-. .... .- -. --. . - .... . .--. .-. --- --. .-. .- -- ... --- .. - -.. --- . ... -. --- - ... .... --- ..- -" | ./dorssel
|
||||
```
|
||||
@@ -91,7 +91,7 @@ invoke undefined behavior.
|
||||
|
||||
Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dorssel < dorssel.c | ./dorssel
|
||||
```
|
||||
|
||||
@@ -101,20 +101,20 @@ better job than most C beautifiers).
|
||||
- Filter your text twice (as in the previous sample) to obtain a version of your
|
||||
text that can be reversibly Morsified, i.e.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dorssel < dorssel.c | ./dorssel | ./dorssel | ./dorssel
|
||||
```
|
||||
|
||||
is the same as
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dorssel < dorssel.c | ./dorssel
|
||||
```
|
||||
|
||||
- The file [dorssel.md](dorssel.md) contains all the information needed to
|
||||
understand this program. For an obfuscated spoiler, try
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./dorssel < dorssel.md
|
||||
```
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ That means bits 6 and 5 set to 00 is length 1, set to 01 is length 2, etc.
|
||||
But this would mean that we would have to extract the length into a
|
||||
counter before shifting out each symbol, such as
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
length = (encoding & 96) >> 5;
|
||||
do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
@@ -62,7 +62,7 @@ We can also use the remaining bits to *include* the counter
|
||||
|
||||
with 1 bit still to be chosen freely (let's assume it is 0). Now we can do
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
encoding >>= 1;
|
||||
@@ -87,7 +87,7 @@ Notice these encodings in the initialization string. Only the coding for
|
||||
`5` needs an escape (`5 = ..... > 01111111 = '\177'`). The way the length
|
||||
is encoded still allows the encoding to be its own counter:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
do {
|
||||
putchar(encoding & 1 ? '-' : '.');
|
||||
encoding = (encoding + 32) >> 1;
|
||||
@@ -101,7 +101,7 @@ precision, so that the actual value of the `char` remains `<= 127`.
|
||||
The character `'-'` (ASCII 45) and `'.'` (ASCII 46) are conveniently in
|
||||
sequence, so the putchar can simply be
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
putchar(45 + encoding % 2);
|
||||
```
|
||||
|
||||
@@ -110,7 +110,7 @@ The assignment can be incorporated into the `while` control test, and a
|
||||
`do-while` loop with a body of a single expression statement can be written
|
||||
as a `while` loop with a comma operator in the test:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
while(putchar(45 + encoding % 2), encoding = encoding + 32 >> 1);
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user