Skip to content

Commit bb011b2

Browse files
authored
Merge pull request #44 from coderofsalvation/reference-md-code-formatting
Fix formatting in reference.md
2 parents b8a397d + 5c74546 commit bb011b2

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

doc/reference.md

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ if $i is "foo"
7474
echo "foo"
7575
else
7676
echo "bar"
77-
77+
</code>
78+
<code>
7879
if not $j is "foo" and $x is "bar"
7980
if $j is "foo" or $j is "xfoo"
8081
if $j > $y and $j != $y or $j >= $y
8182
echo "foo"
82-
83-
</code>
83+
</code>
8484
</pre>
8585
</td>
8686
<td>
@@ -224,7 +224,8 @@ fi
224224
# include bash- or powscript
225225
# at compiletime (=portable)
226226
require 'mymodule.pow'
227-
227+
</code>
228+
<code>
228229
# include remote bashscript
229230
# at runtime
230231
source foo.bash
@@ -249,7 +250,8 @@ bar()
249250
echo "no argument given"
250251
if not empty $1
251252
echo "string given"
252-
253+
<code>
254+
</code>
253255
foo "$@"
254256
</code>
255257
</pre>
@@ -265,7 +267,8 @@ foo(){
265267
echo "string given"
266268
fi
267269
}
268-
270+
</code>
271+
<code>
269272
foo "$@"
270273
</code>
271274
</pre>
@@ -279,17 +282,18 @@ foo "$@"
279282
<code>
280283
myfunc()
281284
echo "value=$1"
282-
285+
</code>
286+
<code>
283287
echo -e "foo\nbar\n" | mappipe myfunc
284-
288+
</code>
289+
<code>
285290
# outputs: 'value=foo' and 'value=bar'
286291
</code>
287292
</pre>
288293
</td>
289294
<td>
290295
<pre>
291296
<code>
292-
293297
</code>
294298
</pre>
295299
</td>
@@ -311,7 +315,6 @@ math '9 / 2' 4
311315
<td>
312316
<pre>
313317
<code>
314-
315318
</code>
316319
</pre>
317320
</td>
@@ -325,10 +328,10 @@ math '9 / 2' 4
325328
myfunc()
326329
sleep 1s
327330
echo "one"
328-
331+
</code>
332+
<code>
329333
await myfunc 123 then
330334
echo "async done"
331-
332335
</code>
333336
</pre>
334337
</td>
@@ -350,13 +353,14 @@ await myfunc 123 then
350353
myfunc()
351354
sleep 1s
352355
echo "one"
353-
356+
</code>
357+
<code>
354358
await myfunc 123 then |
355359
cat -
356-
360+
</code>
361+
<code>
357362
when done
358363
echo "async done"
359-
360364
</code>
361365
</pre>
362366
</td>
@@ -379,7 +383,8 @@ myfunc()
379383
sleep 1s
380384
echo "one"
381385
echo "two"
382-
386+
</code>
387+
<code>
383388
await myfunc 123 then for line
384389
echo "line: $*"
385390
when done
@@ -406,15 +411,13 @@ when done
406411
json={}
407412
cat package.json | json_decode json
408413
echo $json['repository.url']
409-
410-
# outputs: git+https://[email protected]/coderofsalvation/powscript.git
411414
</code>
412415
</pre>
413416
</td>
414417
<td>
415418
<pre>
416419
<code>
417-
420+
# outputs: git+https://[email protected]/coderofsalvation/powscript.git
418421
</code>
419422
</pre>
420423
</td>
@@ -427,18 +430,17 @@ echo $json['repository.url']
427430
<code>
428431
myfunc()
429432
echo "1=$1 2=$2"
430-
433+
</code>
434+
<code>
431435
curry curriedfunc abc
432436
echo -e "foo\nbar\n" | mappipe curriedfunc
433-
434-
# outputs: '1=abc 2=foo' and '1=abc 2=bar'
435437
</code>
436438
</pre>
437439
</td>
438440
<td>
439441
<pre>
440442
<code>
441-
443+
# outputs: '1=abc 2=foo' and '1=abc 2=bar'
442444
</code>
443445
</pre>
444446
</td>
@@ -454,14 +456,12 @@ foo["one"]="foo"
454456
foo["two"]="bar"
455457
map foo keys # prints key per line
456458
map foo values # prints value per line
457-
458459
</code>
459460
</pre>
460461
</td>
461462
<td>
462463
<pre>
463464
<code>
464-
465465
</code>
466466
</pre>
467467
</td>
@@ -474,7 +474,8 @@ map foo values # prints value per line
474474
<code>
475475
printitem()
476476
echo "key=$1 value=$2"
477-
477+
</code>
478+
<code>
478479
foo={}
479480
foo["one"]="foo"
480481
foo["two"]="bar"
@@ -485,7 +486,6 @@ map foo printitem
485486
<td>
486487
<pre>
487488
<code>
488-
489489
</code>
490490
</pre>
491491
</td>
@@ -501,14 +501,13 @@ bar={}
501501
foo["one"]="foo"
502502
bar["foo"]="123"
503503
map foo values | unpipe pick bar
504-
# outputs: '123'
505504
</code>
506505
</pre>
507506
</td>
508507
<td>
509508
<pre>
510509
<code>
511-
510+
# outputs: '123'
512511
</code>
513512
</pre>
514513
</td>
@@ -521,21 +520,21 @@ map foo values | unpipe pick bar
521520
<code>
522521
funcA()
523522
echo "($1)"
524-
523+
</code>
524+
<code>
525525
funcB()
526526
echo "|$1|"
527-
527+
</code>
528+
<code>
528529
compose decorate_string funcA funcB
529530
decorate_string "foo"
530-
531-
# outputs: '(|foo|)'
532531
</code>
533532
</pre>
534533
</td>
535534
<td>
536535
<pre>
537536
<code>
538-
537+
# outputs: '(|foo|)'
539538
</code>
540539
</pre>
541540
</td>

0 commit comments

Comments
 (0)