Skip to content

Commit 7e4e74f

Browse files
More demonstrative code example (skills#64)
* demonstrative example Changed the example shown to demonstrate better how markdown formats (colours) the code block based on the given language, in this case javascript. * Retained previous example Based on feedback on pull request skills#64 from @cmwilson21 the example given in commit 784e639 should stay, but so should the original example.
1 parent d958c77 commit 7e4e74f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/steps/3-add-a-code-example.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _Great job adding an image to the file :tada:_
1010

1111
In addition to code blocks, some code blocks should be rendered differently depending on the language, such as JavaScript or command-line text.
1212

13-
### Example
13+
### Example 1
1414

1515
<pre>
1616
```
@@ -26,6 +26,20 @@ $ git init
2626
Initialized empty Git repository in /Users/skills/Projects/recipe-repository/.git/
2727
```
2828

29+
### Example 2
30+
31+
<pre>
32+
``` javascript
33+
var myVar = "Hello, world!";
34+
```
35+
</pre>
36+
37+
#### How it looks
38+
39+
```javascript
40+
var myVar = "Hello, world!";
41+
```
42+
2943
### :keyboard: Activity: Adding a code example
3044

3145
1. As you did before, edit the file in this pull request.

0 commit comments

Comments
 (0)