Skip to content

Commit cc21724

Browse files
authored
Regularize lang markers (algorithm-archivists#669)
* Corrected tags for 'coffeescript', 'haskell', 'javascript' and 'matlab' * Regularized whitespacing for lang markers
1 parent ef72a15 commit cc21724

File tree

6 files changed

+49
-49
lines changed

6 files changed

+49
-49
lines changed

contents/bubble_sort/bubble_sort.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This means that we need to go through the vector $$\mathcal{O}(n^2)$$ times with
7474
<p>
7575
<img class="center" src="code/scratch/bubble_sort.svg" width="400" />
7676
</p>
77-
{% sample lang="coffeescript" %}
77+
{% sample lang="coffee" %}
7878
[import:1-6, lang:"coffeescript"](code/coffeescript/bubblesort.coffee)
7979
{% endmethod %}
8080

@@ -153,7 +153,7 @@ Trust me, there are plenty of more complicated algorithms that do precisely the
153153
[import, lang:"v"](code/v/bubble_sort.v)
154154
{% sample lang="scratch" %}
155155
The code snippet was taken from this [Scratch project](https://scratch.mit.edu/projects/316483792)
156-
{% sample lang="coffeescript" %}
156+
{% sample lang="coffee" %}
157157
[import, lang:"coffeescript"](code/coffeescript/bubblesort.coffee)
158158
{% endmethod %}
159159

contents/euclidean_algorithm/euclidean_algorithm.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
2323
[import:3-12, lang="lisp"](code/clisp/euclidean.lisp)
2424
{% sample lang="py" %}
2525
[import:11-22, lang="python"](code/python/euclidean_example.py)
26-
{% sample lang="haskell" %}
26+
{% sample lang="hs" %}
2727
[import:2-8, lang="haskell"](code/haskell/euclidean_example.hs)
2828
{% sample lang="rs" %}
2929
[import:3-15, lang="rust"](code/rust/euclidean_example.rs)
@@ -33,7 +33,7 @@ The algorithm is a simple way to find the *greatest common divisor* (GCD) of two
3333
[import:25-38, lang="go"](code/go/euclidean.go)
3434
{% sample lang="swift" %}
3535
[import:1-14, lang="swift"](code/swift/euclidean_algorithm.swift)
36-
{% sample lang="matlab" %}
36+
{% sample lang="m" %}
3737
[import:3-17, lang="matlab"](code/matlab/euclidean.m)
3838
{% sample lang="lua" %}
3939
[import:1-14, lang="lua"](code/lua/euclidean.lua)
@@ -109,7 +109,7 @@ Modern implementations, though, often use the modulus operator (%) like so
109109
[import:14-18, lang="lisp"](code/clisp/euclidean.lisp)
110110
{% sample lang="py" %}
111111
[import:1-9, lang="python"](code/python/euclidean_example.py)
112-
{% sample lang="haskell" %}
112+
{% sample lang="hs" %}
113113
[import:10-14, lang="haskell"](code/haskell/euclidean_example.hs)
114114
{% sample lang="rs" %}
115115
[import:17-27, lang="rust"](code/rust/euclidean_example.rs)
@@ -119,7 +119,7 @@ Modern implementations, though, often use the modulus operator (%) like so
119119
[import:14-23, lang="go"](code/go/euclidean.go)
120120
{% sample lang="swift" %}
121121
[import:16-27, lang="swift"](code/swift/euclidean_algorithm.swift)
122-
{% sample lang="matlab" %}
122+
{% sample lang="m" %}
123123
[import:19-31, lang="matlab"](code/matlab/euclidean.m)
124124
{% sample lang="lua" %}
125125
[import:16-25, lang="lua"](code/lua/euclidean.lua)
@@ -206,7 +206,7 @@ Here's a video on the Euclidean algorithm:
206206
[import, lang="lisp"](code/clisp/euclidean.lisp)
207207
{% sample lang="py" %}
208208
[import, lang="python"](code/python/euclidean_example.py)
209-
{% sample lang="haskell" %}
209+
{% sample lang="hs" %}
210210
[import, lang="haskell"](code/haskell/euclidean_example.hs)
211211
{% sample lang="rs" %}
212212
[import, lang="rust"](code/rust/euclidean_example.rs)
@@ -216,7 +216,7 @@ Here's a video on the Euclidean algorithm:
216216
[import, lang="go"](code/go/euclidean.go)
217217
{% sample lang="swift" %}
218218
[import, lang="swift"](code/swift/euclidean_algorithm.swift)
219-
{% sample lang="matlab" %}
219+
{% sample lang="m" %}
220220
[import, lang="matlab"](code/matlab/euclidean.m)
221221
{% sample lang="lua" %}
222222
[import, lang="lua"](code/lua/euclidean.lua)

contents/monte_carlo_integration/monte_carlo_integration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ Feel free to submit your version via pull request, and thanks for reading!
142142
[import, lang:"javascript"](code/javascript/monte_carlo.js)
143143
{% sample lang="hs" %}
144144
[import, lang:"haskell"](code/haskell/monteCarlo.hs)
145-
{%sample lang="rs" %}
145+
{% sample lang="rs" %}
146146
[import, lang:"rust"](code/rust/monte_carlo.rs)
147-
{%sample lang="d" %}
147+
{% sample lang="d" %}
148148
[import, lang:"d"](code/d/monte_carlo.d)
149-
{%sample lang="go" %}
149+
{% sample lang="go" %}
150150
[import, lang:"go"](code/go/monteCarlo.go)
151-
{%sample lang="r" %}
151+
{% sample lang="r" %}
152152
[import, lang:"r"](code/r/monte_carlo.R)
153153
{% sample lang="java" %}
154154
[import, lang:"java"](code/java/MonteCarlo.java)

contents/thomas_algorithm/thomas_algorithm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ You will find this algorithm implemented [in this project](https://scratch.mit.e
119119
[import, lang:"swift"](code/swift/thomas.swift)
120120
{% sample lang="php" %}
121121
[import, lang:"php"](code/php/thomas.php)
122-
{%sample lang="nim" %}
122+
{% sample lang="nim" %}
123123
[import, lang:"nim"](code/nim/thomas_algorithm.nim)
124124
{% sample lang="cpp" %}
125125
[import, lang:"cpp"](code/c++/thomas.cpp)

contents/tree_traversal/tree_traversal.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ As a note, a `node` struct is not necessary in javascript, so this is an example
2222
<p>
2323
<img class="center" src="code/scratch/struct.svg" width="250" />
2424
</p>
25-
{% sample lang="rs"%}
25+
{% sample lang="rs" %}
2626
[import:4-7, lang:"rust"](code/rust/tree.rs)
27-
{% sample lang="hs"%}
27+
{% sample lang="hs" %}
2828
[import:1-4, lang:"haskell"](code/haskell/TreeTraversal.hs)
29-
{% sample lang="swift"%}
29+
{% sample lang="swift" %}
3030
[import:1-9, lang:"swift"](code/swift/tree.swift)
31-
{% sample lang="php"%}
31+
{% sample lang="php" %}
3232
[import:4-37, lang:"php"](code/php/tree_traversal.php)
3333
{% sample lang="crystal" %}
3434
[import:1-5, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -62,13 +62,13 @@ Because of this, the most straightforward way to traverse the tree might be recu
6262
<img class="center" src="code/scratch/dfs.svg" width="250" />
6363
<img class="center" src="code/scratch/dfs-from.svg" width="250" />
6464
</p>
65-
{% sample lang="rs"%}
65+
{% sample lang="rs" %}
6666
[import:9-15 lang:"rust"](code/rust/tree.rs)
67-
{% sample lang="hs"%}
67+
{% sample lang="hs" %}
6868
[import:6-7, lang:"haskell"](code/haskell/TreeTraversal.hs)
69-
{% sample lang="swift"%}
69+
{% sample lang="swift" %}
7070
[import:24-30, lang:"swift"](code/swift/tree.swift)
71-
{% sample lang="php"%}
71+
{% sample lang="php" %}
7272
[import:41-49, lang:"php"](code/php/tree_traversal.php)
7373
{% sample lang="crystal" %}
7474
[import:7-10, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -110,13 +110,13 @@ Now, in this case the first element searched through is still the root of the tr
110110
<p>
111111
<img class="center" src="code/scratch/dfs-post.svg" width="300" />
112112
</p>
113-
{% sample lang="rs"%}
113+
{% sample lang="rs" %}
114114
[import:17-24, lang:"rust"](code/rust/tree.rs)
115-
{% sample lang="hs"%}
115+
{% sample lang="hs" %}
116116
[import:9-10, lang:"haskell"](code/haskell/TreeTraversal.hs)
117-
{% sample lang="swift"%}
117+
{% sample lang="swift" %}
118118
[import:32-38, lang:"swift"](code/swift/tree.swift)
119-
{% sample lang="php"%}
119+
{% sample lang="php" %}
120120
[import:51-57, lang:"php"](code/php/tree_traversal.php)
121121
{% sample lang="crystal" %}
122122
[import:12-15, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -153,13 +153,13 @@ In this case, the first node visited is at the bottom of the tree and moves up t
153153
<p>
154154
<img class="center" src="code/scratch/dfs-in.svg" width="300" />
155155
</p>
156-
{% sample lang="rs"%}
156+
{% sample lang="rs" %}
157157
[import:25-40, lang:"rust"](code/rust/tree.rs)
158-
{% sample lang="hs"%}
158+
{% sample lang="hs" %}
159159
[import:12-16, lang:"haskell"](code/haskell/TreeTraversal.hs)
160-
{% sample lang="swift"%}
160+
{% sample lang="swift" %}
161161
[import:40-53, lang:"swift"](code/swift/tree.swift)
162-
{% sample lang="php"%}
162+
{% sample lang="php" %}
163163
[import:59-78, lang:"php"](code/php/tree_traversal.php)
164164
{% sample lang="crystal" %}
165165
[import:17-31, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -206,13 +206,13 @@ In code, it looks like this:
206206
<p>
207207
<img class="center" src="code/scratch/dfs-stack.svg" width="400" />
208208
</p>
209-
{% sample lang="rs"%}
209+
{% sample lang="rs" %}
210210
[import:41-48, lang:"rust"](code/rust/tree.rs)
211-
{% sample lang="hs"%}
211+
{% sample lang="hs" %}
212212
[import:18-22, lang:"haskell"](code/haskell/TreeTraversal.hs)
213-
{% sample lang="swift"%}
213+
{% sample lang="swift" %}
214214
[import:55-67, lang:"swift"](code/swift/tree.swift)
215-
{% sample lang="php"%}
215+
{% sample lang="php" %}
216216
[import:80-91, lang:"php"](code/php/tree_traversal.php)
217217
{% sample lang="crystal" %}
218218
[import:33-41, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -251,13 +251,13 @@ And this is exactly what Breadth-First Search (BFS) does! On top of that, it can
251251
<p>
252252
<img class="center" src="code/scratch/bfs.svg" width="400" />
253253
</p>
254-
{% sample lang="rs"%}
254+
{% sample lang="rs" %}
255255
[import:50-58, lang:"rust"](code/rust/tree.rs)
256-
{% sample lang="hs"%}
256+
{% sample lang="hs" %}
257257
[import:24-28, lang:"haskell"](code/haskell/TreeTraversal.hs)
258-
{% sample lang="swift"%}
258+
{% sample lang="swift" %}
259259
[import:69-81, lang:"swift"](code/swift/tree.swift)
260-
{% sample lang="php"%}
260+
{% sample lang="php" %}
261261
[import:93-104, lang:"php"](code/php/tree_traversal.php)
262262
{% sample lang="crystal" %}
263263
[import:43-51, lang:"crystal"](code/crystal/tree-traversal.cr)
@@ -306,13 +306,13 @@ Here is a video describing tree traversal:
306306

307307
The code snippets were taken from this [Scratch project](https://scratch.mit.edu/projects/174017753/)
308308

309-
{% sample lang="rs"%}
309+
{% sample lang="rs" %}
310310
[import, lang:"rust"](code/rust/tree.rs)
311-
{% sample lang="hs"%}
311+
{% sample lang="hs" %}
312312
[import, lang:"haskell"](code/haskell/TreeTraversal.hs)
313-
{% sample lang="swift"%}
313+
{% sample lang="swift" %}
314314
[import, lang:"swift"](code/swift/tree.swift)
315-
{% sample lang="php"%}
315+
{% sample lang="php" %}
316316
[import, lang:"php"](code/php/tree_traversal.php)
317317
{% sample lang="crystal" %}
318318
[import, lang:"crystal"](code/crystal/tree-traversal.cr)

contents/verlet_integration/verlet_integration.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ Here is what it looks like in code:
4545
{% sample lang="scratch" %}
4646
Unfortunately, this has not yet been implemented in scratch, so here's Julia code:
4747
[import:1-13, lang:"julia"](code/julia/verlet.jl)
48-
{% sample lang="matlab" %}
48+
{% sample lang="m" %}
4949
Unfortunately, this has not yet been implemented in matlab, so here's Julia code:
5050
[import:1-13, lang:"julia"](code/julia/verlet.jl)
5151
{% sample lang="LabVIEW" %}
5252
Unfortunately, this has not yet been implemented in LabVIEW, so here's Julia code:
5353
[import:1-13, lang:"julia"](code/julia/verlet.jl)
54-
{% sample lang="javascript" %}
54+
{% sample lang="js" %}
5555
[import:1-14, lang:"javascript"](code/javascript/verlet.js)
5656
{% sample lang="rs" %}
5757
[import:1-13, lang:"rust"](code/rust/verlet.rs)
@@ -103,13 +103,13 @@ However, the error for this is $$\mathcal{O}(\Delta t)$$, which is quite poor, b
103103
{% sample lang="scratch" %}
104104
Unfortunately, this has not yet been implemented in scratch, so here's Julia code:
105105
[import:15-31, lang:"julia"](code/julia/verlet.jl)
106-
{% sample lang="matlab" %}
106+
{% sample lang="m" %}
107107
Unfortunately, this has not yet been implemented in matlab, so here's Julia code:
108108
[import:15-31, lang:"julia"](code/julia/verlet.jl)
109109
{% sample lang="LabVIEW" %}
110110
Unfortunately, this has not yet been implemented in LabVIEW, so here's Julia code:
111111
[import:15-31, lang:"julia"](code/julia/verlet.jl)
112-
{% sample lang="javascript" %}
112+
{% sample lang="js" %}
113113
[import:16-32, lang:"javascript"](code/javascript/verlet.js)
114114
{% sample lang="rs" %}
115115
[import:15-32, lang:"rust"](code/rust/verlet.rs)
@@ -175,13 +175,13 @@ Here is the velocity Verlet method in code:
175175
{% sample lang="scratch" %}
176176
Unfortunately, this has not yet been implemented in scratch, so here's Julia code:
177177
[import:33-45, lang:"julia"](code/julia/verlet.jl)
178-
{% sample lang="matlab" %}
178+
{% sample lang="m" %}
179179
Unfortunately, this has not yet been implemented in matlab, so here's Julia code:
180180
[import:33-45, lang:"julia"](code/julia/verlet.jl)
181181
{% sample lang="LabVIEW" %}
182182
Unfortunately, this has not yet been implemented in LabVIEW, so here's Julia code:
183183
[import:33-45, lang:"julia"](code/julia/verlet.jl)
184-
{% sample lang="javascript" %}
184+
{% sample lang="js" %}
185185
[import:34-45, lang:"javascript"](code/javascript/verlet.js)
186186
{% sample lang="rs" %}
187187
[import:34-45, lang:"rust"](code/rust/verlet.rs)
@@ -237,14 +237,14 @@ Submitted by Jie
237237
<img class="center" src="code/scratch/verlet_scratch.png" />
238238
</p>
239239
Link: [https://scratch.mit.edu/projects/173039394/](https://scratch.mit.edu/projects/173039394/)
240-
{% sample lang="matlab" %}
240+
{% sample lang="m" %}
241241
[import, lang:"matlab"](code/matlab/verlet.m)
242242
{% sample lang="LabVIEW" %}
243243
Submitted by P. Mekhail
244244
<p>
245245
<img class="center" src="code/labview/verlet_labview.png" />
246246
</p>
247-
{% sample lang="javascript" %}
247+
{% sample lang="js" %}
248248
[import, lang:"javascript"](code/javascript/verlet.js)
249249
{% sample lang="rs" %}
250250
[import, lang:"rust"](code/rust/verlet.rs)

0 commit comments

Comments
 (0)