Skip to content

Commit 0ec2add

Browse files
[Core] Add a language to every code block (#39212)
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
1 parent 546cd38 commit 0ec2add

File tree

34 files changed

+92
-92
lines changed

34 files changed

+92
-92
lines changed

content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You can check the email address used for a commit by adding `.patch` to the end
6161

6262
[https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch](https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch)
6363

64-
```
64+
```text
6565
From 67c0afc1da354d8571f51b6f0af8f2794117fd10 Mon Sep 17 00:00:00 2001
6666
From: The Octocat <octocat@nowhere.com>
6767
Date: Sun, 27 Apr 2014 15:36:39 +0530

content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ If you are a site administrator for {% data variables.location.product_location
7070
> Generating public/private ALGORITHM key pair.
7171
```
7272

73-
1. When you're prompted to "Enter a file in which to save the key", you can press **Enter** to accept the default file location. Please note that if you created SSH keys previously, ssh-keygen may ask you to rewrite another key, in which case we recommend creating a custom-named SSH key. To do so, type the default file location and replace id_ssh_keyname with your custom key name.
73+
When you're prompted to "Enter a file in which to save the key", you can press **Enter** to accept the default file location. Please note that if you created SSH keys previously, ssh-keygen may ask you to rewrite another key, in which case we recommend creating a custom-named SSH key. To do so, type the default file location and replace id_ssh_keyname with your custom key name.
7474

7575
{% mac %}
7676

@@ -128,7 +128,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
128128
129129
- Open your `~/.ssh/config` file, then modify the file to contain the following lines. If your SSH key file has a different name or path than the example code, modify the filename or path to match your current setup.
130130
131-
```
131+
```text
132132
Host {% ifversion ghes or ghae %}HOSTNAME{% else %}github.com{% endif %}
133133
AddKeysToAgent yes
134134
UseKeychain yes
@@ -143,7 +143,7 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
143143
144144
- If you see a `Bad configuration option: usekeychain` error, add an additional line to the configuration's' `Host *.{% ifversion ghes or ghae %}HOSTNAME{% else %}github.com{% endif %}` section.
145145
146-
```
146+
```text
147147
Host {% ifversion ghes or ghae %}HOSTNAME{% else %}github.com{% endif %}
148148
IgnoreUnknown UseKeychain
149149
```
@@ -162,9 +162,9 @@ Before adding a new SSH key to the ssh-agent to manage your keys, you should hav
162162
163163
The `--apple-use-keychain` option is in Apple's standard version of `ssh-add`. In MacOS versions prior to Monterey (12.0), the `--apple-use-keychain` and `--apple-load-keychain` flags used the syntax `-K` and `-A`, respectively.
164164

165-
If you don't have Apple's standard version of `ssh-add` installed, you may receive an error. For more information, see "[Error: ssh-add: illegal option -- K](/articles/error-ssh-add-illegal-option-k)."
165+
If you don't have Apple's standard version of `ssh-add` installed, you may receive an error. For more information, see "[Error: ssh-add: illegal option -- K](/articles/error-ssh-add-illegal-option-k)."
166166

167-
If you continue to be prompted for your passphrase, you may need to add the command to your `~/.zshrc` file (or your `~/.bashrc` file for bash).
167+
If you continue to be prompted for your passphrase, you may need to add the command to your `~/.zshrc` file (or your `~/.bashrc` file for bash).
168168

169169
{% endnote %}
170170

content/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ To illustrate how `git filter-repo` works, we'll show you how to remove your fil
8080

8181
1. Install the latest release of the [git filter-repo](https://github.com/newren/git-filter-repo) tool. You can install `git-filter-repo` manually or by using a package manager. For example, to install the tool with HomeBrew, use the `brew install` command.
8282

83-
```
83+
```shell
8484
brew install git-filter-repo
8585
```
8686

content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ If that worked, great! If not, you may need to [follow our troubleshooting guide
3636
3737
Now, to clone the repository, you can run the following command:
3838
39-
```
39+
```shell
4040
git clone ssh://git@ssh.{% data variables.command_line.codeblock %}:443/YOUR-USERNAME/YOUR-REPOSITORY.git
4141
```
4242
@@ -46,7 +46,7 @@ If you are able to SSH into `git@ssh.{% data variables.command_line.backticks %}
4646
4747
To set this in your SSH configuration file, edit the file at `~/.ssh/config`, and add this section:
4848
49-
```
49+
```text
5050
Host {% data variables.command_line.codeblock %}
5151
Hostname ssh.{% data variables.command_line.codeblock %}
5252
Port 443

content/billing/managing-billing-for-github-advanced-security/viewing-committer-information-for-github-advanced-security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Under "Calculate Additional Advanced Committers", you can calculate how many mor
3737
1. In the left sidebar, click **Advanced Security Committers**.
3838
1. Under "Organizations and Repositories", enter or paste a list of organizations and repositories, with one organization or repository per line. For example:
3939

40-
```
40+
```text
4141
example-org
4242
octo-org/octo-repo
4343
```

content/get-started/getting-started-with-git/configuring-git-to-handle-line-endings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ A `.gitattributes` file looks like a table with two columns:
7777

7878
Here's an example `.gitattributes` file. You can use it as a template for your repositories:
7979

80-
```
80+
```text
8181
# Set the default behavior, in case people don't have core.autocrlf set.
8282
* text=auto
8383

content/get-started/using-git/about-git-rebase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ There are six commands available while rebasing:
7070

7171
No matter which command you use, Git will launch [your default text editor](/get-started/getting-started-with-git/associating-text-editors-with-git) and open a file that details the commits in the range you've chosen. That file looks something like this:
7272

73-
```
73+
```text
7474
pick 1fc6c95 Patch A
7575
pick 6b2481b Patch B
7676
pick dd1475d something I want to split

content/get-started/using-git/using-git-rebase-on-the-command-line.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this example, we will cover all of the `git rebase` commands available, excep
2020

2121
We'll start our rebase by entering `git rebase --interactive HEAD~7` on the terminal. Our favorite text editor will display the following lines:
2222

23-
```
23+
```text
2424
pick 1fc6c95 Patch A
2525
pick 6b2481b Patch B
2626
pick dd1475d something I want to split
@@ -42,7 +42,7 @@ Phew! This sounds like a lot of work, but by taking it one step at a time, we ca
4242

4343
To start, we'll need to modify the commands in the file to look like this:
4444

45-
```
45+
```text
4646
pick 1fc6c95 Patch A
4747
squash fa39187 something to add to patch A
4848
pick 7b36971 something to move before patch B
@@ -58,7 +58,7 @@ Now, save and close the editor; this will start the interactive rebase.
5858

5959
Git skips the first rebase command, `pick 1fc6c95`, since it doesn't need to do anything. It goes to the next command, `squash fa39187`. Since this operation requires your input, Git opens your text editor once again. The file it opens up looks something like this:
6060

61-
```
61+
```text
6262
# This is a combination of two commits.
6363
# The first commit's message is:
6464
@@ -82,7 +82,7 @@ This file is Git's way of saying, "Hey, here's what I'm about to do with this `s
8282

8383
When the editor is closed, the rebase continues:
8484

85-
```
85+
```text
8686
pick 1fc6c95 Patch A
8787
squash fa39187 something to add to patch A
8888
pick 7b36971 something to move before patch B
@@ -110,7 +110,7 @@ At this point, you can edit any of the files in your project to make any additio
110110

111111
Git then gets to the `reword 4ca2acc` command. It opens up your text editor one more time, and presents the following information:
112112

113-
```
113+
```text
114114
i cant' typ goods
115115
116116
# Please enter the commit message for your changes. Lines starting

content/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ You can create a new paragraph by leaving a blank line between lines of text.
317317

318318
You can add footnotes to your content by using this bracket syntax:
319319

320-
```
320+
```text
321321
Here is a simple footnote[^1].
322322
323323
A footnote can also have multiple lines[^2].

content/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ There are two options for delimiting a math expression inline with your text. Yo
2222
To include a math expression inline within your text, delimit the expression with dollar symbols `$`.
2323
{% endif %}
2424

25-
```
25+
```text
2626
This sentence uses `$` delimiters to show math inline: $\sqrt{3x-1}+(1+x)^2$
2727
```
2828

2929
![Screenshot of rendered Markdown showing how a mathematical expression displays on {% data variables.product.prodname_dotcom %}. The equation is the square root of 3 x minus 1 plus open paren 1 plus x close paren squared.](/assets/images/help/writing/inline-math-markdown-rendering.png)
3030

3131
{% ifversion math-backtick-syntax %}
3232

33-
````
33+
```text
3434
This sentence uses $\` and \`$ delimiters to show math inline: $`\sqrt{3x-1}+(1+x)^2`$
35-
````
35+
```
3636

3737
![Screenshot of rendered Markdown showing how a mathematical expression displays inline on {% data variables.product.prodname_dotcom %}. The equation is the square root of 3 x minus 1 plus open paren 1 plus x close paren squared.](/assets/images/help/writing/inline-backtick-math-markdown-rendering.png)
3838
{% endif %}
@@ -41,7 +41,7 @@ This sentence uses $\` and \`$ delimiters to show math inline: $`\sqrt{3x-1}+(1
4141

4242
To add a math expression as a block, start a new line and delimit the expression with two dollar symbols `$$`.
4343

44-
```
44+
```text
4545
**The Cauchy-Schwarz Inequality**
4646
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
4747
```
@@ -52,7 +52,7 @@ $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \
5252

5353
Alternatively, you can use the <code>\`\`\`math</code> code block syntax to display a math expression as a block. With this syntax, you don't need to use `$$` delimiters. The following will render the same as above:
5454

55-
````
55+
````text
5656
**The Cauchy-Schwarz Inequality**
5757
5858
```math
@@ -65,18 +65,18 @@ Alternatively, you can use the <code>\`\`\`math</code> code block syntax to disp
6565
## Writing dollar signs in line with and within mathematical expressions
6666

6767
To display a dollar sign as a character in the same line as a mathematical expression, you need to escape the non-delimiter `$` to ensure the line renders correctly.
68-
68+
6969
- Within a math expression, add a `\` symbol before the explicit `$`.
7070

71-
```
71+
```text
7272
This expression uses `\$` to display a dollar sign: $\sqrt{\$4}$
7373
```
7474

7575
![Screenshot of rendered Markdown showing how a backslash before a dollar sign displays the sign as part of a mathematical expression.](/assets/images/help/writing/dollar-sign-within-math-expression.png)
7676

7777
- Outside a math expression, but on the same line, use span tags around the explicit `$`.
7878

79-
```
79+
```text
8080
To split <span>$</span>100 in half, we calculate $100/2$
8181
```
8282

0 commit comments

Comments
 (0)