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
+11
-11
@@ -1,20 +1,20 @@
|
||||
## To build:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 num num
|
||||
```
|
||||
|
||||
|
||||
## Try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
To see good C Preprocessor buzzard.1, try:
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
make babble.cppcb
|
||||
cat babble.cppcb
|
||||
```
|
||||
@@ -54,19 +54,19 @@ short strings.
|
||||
`buzzard.1` is a simple mathematical program. It expects two numeric
|
||||
arguments.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 0 <num>
|
||||
```
|
||||
|
||||
will print out the factorial of `<num>`.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 <num1> <num2>
|
||||
```
|
||||
|
||||
will print out the largest common factor of `num1` and `num2`.
|
||||
|
||||
```<!---sh-->
|
||||
``` <!---sh-->
|
||||
./buzzard.1 1 <num2>
|
||||
```
|
||||
|
||||
@@ -171,21 +171,21 @@ programs is the conditional (given that we have loops).
|
||||
Since all you can do in the given operation output set is
|
||||
assignment, we implement "conditional assignment":
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
if (x) y = z;
|
||||
```
|
||||
|
||||
To implement this, we constrain `x` to be either 0 or 1, and
|
||||
simply compute:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
y = (z * x) + (y * (1-x));
|
||||
```
|
||||
|
||||
This is more obscured by factoring out common terms and restricting
|
||||
ourselves to two operand operations:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
temp = z; (temp == z)
|
||||
temp -= y; (temp == z-y)
|
||||
temp *= x; (temp == (z-y)*x)
|
||||
@@ -199,7 +199,7 @@ Next we imagine we have a [pc](https://en.wikipedia.org/wiki/Program_counter).
|
||||
we're not currently coming up on statement pc. To handle this, we simply make
|
||||
every operation conditional on the pc having the correct value:
|
||||
|
||||
```<!---c-->
|
||||
``` <!---c-->
|
||||
if (pc == some_constant) y = z;
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user