convert.sed
... ...
@@ -30,6 +30,36 @@ s/^\(#\+\)\s\+[0-9.]\+\s\+/\1 /
30 30
a ---
31 31
}
32 32
33
+# Convert bash code
34
+/^#!\/.*sh/,/Get Code/ {
35
+ /^#!\/.*sh/ i ```shell
36
+ s/\s\+$// # clean whitespace
37
+ /Get Code/ {
38
+ a ```
39
+ d
40
+ }
41
+}
42
+
43
+# Convert ruby code
44
+/^#!\/.*ruby/,/Get Code/ {
45
+ /^#!\/.*ruby/ i ```ruby
46
+ s/\s\+$// # clean whitespace
47
+ /Get Code/ {
48
+ a ```
49
+ d
50
+ }
51
+}
52
+
53
+# Convert ruby code
54
+/^#!\/.*python/,/Get Code/ {
55
+ /^#!\/.*python/ i ```python
56
+ s/\s\+$// # clean whitespace
57
+ /Get Code/ {
58
+ a ```
59
+ d
60
+ }
61
+}
62
+
33 63
# House.WhaleBarn has a linked embedded image
34 64
/(!\[Floor Plan\]\[38\])\[38\]/ {
35 65
y/()/[]/