From 7e4e74f50b6690306121b282523a565c21cceebd Mon Sep 17 00:00:00 2001 From: Thomas Hudson Date: Mon, 14 Aug 2023 22:14:16 +0100 Subject: [PATCH] More demonstrative code example (#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 #64 from @cmwilson21 the example given in commit 784e639 should stay, but so should the original example. --- .github/steps/3-add-a-code-example.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/steps/3-add-a-code-example.md b/.github/steps/3-add-a-code-example.md index 8a4ecac..8c65fc7 100644 --- a/.github/steps/3-add-a-code-example.md +++ b/.github/steps/3-add-a-code-example.md @@ -10,7 +10,7 @@ _Great job adding an image to the file :tada:_ In addition to code blocks, some code blocks should be rendered differently depending on the language, such as JavaScript or command-line text. -### Example +### Example 1
 ```
@@ -26,6 +26,20 @@ $ git init
 Initialized empty Git repository in /Users/skills/Projects/recipe-repository/.git/
 ```
 
+### Example 2
+
+
+``` javascript
+var myVar = "Hello, world!";
+```
+
+ +#### How it looks + +```javascript +var myVar = "Hello, world!"; +``` + ### :keyboard: Activity: Adding a code example 1. As you did before, edit the file in this pull request.