Skip to content

Commit 68f5867

Browse files
committed
Add highlight tags around "Wanted Recipes" one-liners that other break Markdown format.
1 parent 65b8a95 commit 68f5867

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

wanted-recipes.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ In the notes below, "JS" means the recipe is just a simple passthrough to an exi
1717
## Strings
1818

1919
* HTML methods # JS .sup(), .sub(), .blink(), .link(url), etc. May not exist in your JS impl!
20-
* substr # str.substr(x,y) === str[x..x+y-1] === str[x...x+y]
21-
* substring # str.substring(x,y) === str.slice(x,y) === str[x..y-1] === str[x...y]
20+
* substr
21+
{% highlight coffeescript %}
22+
str.substr(x,y) === str[x..x+y-1] === str[x...x+y]
23+
{% endhighlight %}
24+
* substring
25+
{% highlight coffeescript %}
26+
str.substring(x,y) === str.slice(x,y) === str[x..y-1] === str[x...y]
27+
{% endhighlight %}
2228
* Replacing substrings
2329

2430
## Arrays
@@ -30,10 +36,10 @@ even = (x) -> x % 2 == 0
3036
evens.every even
3137
# => true
3238
{% endhighlight %}
33-
* Filtering arrays # [1..10.filter (x) -> x % 2 == 0 # => [ 2, 4, 6, 8, 10 ]
34-
* Detecting presence of matching items in an array # [1..10].some (x) -> x % 2 == 0 # => true
35-
* Processing an array item by item # [10..1].forEach (x) -> console.log x # => nothing;, but a countdown is displayed on the console
36-
* Replace all duplicates of an array
39+
* Detecting presence of matching items in an array
40+
{% highlight coffeescript %}
41+
[1..10].some (x) -> x % 2 == 0 # => true
42+
{% endhighlight %}
3743

3844
## Dates and Times
3945

0 commit comments

Comments
 (0)