From cb52336ab316d7b30d05222b38a35de610c19b9c Mon Sep 17 00:00:00 2001 From: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:28:13 -0700 Subject: [PATCH] Add note about copyable code blocks to style guide (#35915) --- contributing/content-style-guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contributing/content-style-guide.md b/contributing/content-style-guide.md index 9db2a35a8b6f..d808410a7866 100644 --- a/contributing/content-style-guide.md +++ b/contributing/content-style-guide.md @@ -53,11 +53,12 @@ Style your CTAs using the following format. ### Code blocks -Keep lines in code samples to about 60 characters, to avoid requiring readers to scroll horizontally in the code block. Locate explanatory text before the code block, rather than using comments inside the code block. +Keep lines in code samples to about 60 characters, to avoid requiring readers to scroll horizontally in the code block. Locate explanatory text before the code block, rather than using comments inside the code block. See "[Code sample syntax highlighting](./content-markup-reference.md#code-sample-syntax-highlighting)" for more information on the syntax and formatting of code blocks. Within code blocks: - Do not use markup before the command output. - Only use `$` before the command itself if you’re showing the command’s output in the same block. + - If you show a command and the command's output, do not make the code block copyable. - If your code example includes `{` or `}` that should render, wrap that section in `{% raw %}` `{% endraw %}` to disable Liquid processing for that section. - If your code example includes content that should be parsed (for example, HTML tags to format text), wrap that section in `
` `` tags to parse rather than escape the content in the section. - **Use**: