From 6de5144c8c7ec7b1d15c76480fdd66da72a12942 Mon Sep 17 00:00:00 2001 From: Shaun Hamilton <51722130+Sky020@users.noreply.github.com> Date: Thu, 15 Oct 2020 09:25:05 +0100 Subject: [PATCH] fix(docs): add formatting instructions for coding challenge text (#39660) * fix(docs): add formatting instructions * add note about markdown * fix: mention preference to use single-quotes Co-authored-by: Oliver Eyton-Williams --- docs/how-to-work-on-coding-challenges.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/how-to-work-on-coding-challenges.md b/docs/how-to-work-on-coding-challenges.md index d83b31b8f9382d..e68d9bd9d61133 100644 --- a/docs/how-to-work-on-coding-challenges.md +++ b/docs/how-to-work-on-coding-challenges.md @@ -209,13 +209,15 @@ Our goal is to have thousands of 2-minute challenges. These can flow together an Here are specific formatting guidelines for challenge text and examples: - Language keywords go in `` tags. For example, HTML tag names or CSS property names -- The first instance of a keyword when it's being defined, or general keywords (i.e. "object" or "immutable") go in `` tags +- The first instance of a keyword when it's being defined, or general keywords (e.g. "object" or "immutable") go in `` tags - References to code parts (i.e. function, method or variable names) should be wrapped in `` tags. See example below: -- Use parseInt to convert the variable realNumber into an integer. -- Multi-line code blocks **must be preceded by an empty line**. The next line must start with three backticks followed immediately by one of the [supported languages](https://prismjs.com/#supported-languages). To complete the code block, you must start a newline which only has three backticks and **another empty line**. - **Note:** If you are going to use an example code in YAML, use `yaml` instead of `yml` for the language to the right of the backticks. - -See example below: +```md +Use parseInt to convert the variable realNumber into an integer. +``` +- References to file names and path directories (e.g. `package.json`, `src/components`) should be wrapped in `` tags. +- Multi-line code blocks **must be preceded by an empty line**. The next line must start with three backticks followed immediately by one of the [supported languages](https://prismjs.com/#supported-languages). To complete the code block, you must start a newline which only has three backticks and **another empty line**. See example below: + +**Note:** If you are going to use an example code in YAML, use `yaml` instead of `yml` for the language to the right of the backticks. ````md The following is an example of code: @@ -229,7 +231,9 @@ The following is an example of code: - Additional information in the form of a note should be formatted `Note: Rest of note text...` - If multiple notes are needed, then list all of the notes in separate sentences using the format `Notes: First note text. Second note text.`. -- Use double quotes where applicable +- Use single-quotes where applicable + +**Note:** The equivalent _Markdown_ should be used, where applicable, in place of _HTML_ tags. ## Writing tests