From ce11747ab061c3d2d9edfe6b9b244d1ab9ac720f Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Mon, 25 Sep 2023 11:40:18 -0700 Subject: [PATCH] fix incorrect code languages --- content/actions/learn-github-actions/expressions.md | 4 ++-- .../secret-scanning/secret-scanning-partner-program.md | 2 +- .../adding-features-to-a-devcontainer-file.md | 4 ++-- ...etting-up-a-template-repository-for-github-codespaces.md | 2 +- .../writing-for-github-docs/creating-screenshots.md | 6 ++++-- .../autolinked-references-and-urls.md | 2 +- .../github-cli/github-cli/creating-github-cli-extensions.md | 2 +- content/rest/guides/encrypting-secrets-for-the-rest-api.md | 2 +- data/reusables/README.md | 2 +- src/content-render/README.md | 2 +- src/redirects/README.md | 2 +- src/search/README.md | 2 +- 12 files changed, 17 insertions(+), 15 deletions(-) diff --git a/content/actions/learn-github-actions/expressions.md b/content/actions/learn-github-actions/expressions.md index 4bd65bc15f1d..4920af87812f 100644 --- a/content/actions/learn-github-actions/expressions.md +++ b/content/actions/learn-github-actions/expressions.md @@ -196,7 +196,7 @@ Replaces values in the `string`, with the variable `replaceValueN`. Variables in {% raw %} -```js +```javascript format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') ``` @@ -208,7 +208,7 @@ Returns 'Hello Mona the Octocat'. {% raw %} -```js +```javascript format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat') ``` diff --git a/content/code-security/secret-scanning/secret-scanning-partner-program.md b/content/code-security/secret-scanning/secret-scanning-partner-program.md index 266011b73512..d0a71ba7359d 100644 --- a/content/code-security/secret-scanning/secret-scanning-partner-program.md +++ b/content/code-security/secret-scanning/secret-scanning-partner-program.md @@ -324,7 +324,7 @@ puts openssl_key.verify(OpenSSL::Digest::SHA256.new, Base64.decode64(signature), **Validation sample in JavaScript** -```js +```javascript const crypto = require("crypto"); const axios = require("axios"); diff --git a/content/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file.md b/content/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file.md index 4d27f6d087a6..49a448a99a76 100644 --- a/content/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file.md +++ b/content/codespaces/setting-up-your-project-for-codespaces/configuring-dev-containers/adding-features-to-a-devcontainer-file.md @@ -31,7 +31,7 @@ redirect_from: ![Screenshot of the "Marketplace" tab showing the installation code snippet for Terraform.](/assets/images/help/codespaces/feature-installation-code.png) - ```JSON + ```json "features": { ... "ghcr.io/devcontainers/features/terraform:1": {}, @@ -43,7 +43,7 @@ redirect_from: ![Screenshot of the "Options" section of the "Marketplace" tab, with the "version" and "tflint" properties expanded.](/assets/images/help/codespaces/feature-options.png) - ```JSON + ```json "features": { ... "ghcr.io/devcontainers/features/terraform:1": { diff --git a/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces.md b/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces.md index e471a7a399d0..155df69c1c80 100644 --- a/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces.md +++ b/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-repository/setting-up-a-template-repository-for-github-codespaces.md @@ -62,7 +62,7 @@ You should configure your dev container with the tools and customization to give The following configuration settings for a React template will open the `app.js` file in the user's editor, run `npm start` (defined in a `package.json` file) to start a local server, and forward port `3000` to a preview browser tab in the codespace. -```JSON +```json { "postAttachCommand": { "server": "npm start" diff --git a/content/contributing/writing-for-github-docs/creating-screenshots.md b/content/contributing/writing-for-github-docs/creating-screenshots.md index cce66a743c82..ee0811fc7152 100644 --- a/content/contributing/writing-for-github-docs/creating-screenshots.md +++ b/content/contributing/writing-for-github-docs/creating-screenshots.md @@ -195,7 +195,8 @@ Directory | Usage When there are differences between plans, you can use Liquid conditionals to version the two images. -```{% raw %} +```markdown +{% raw %} {% ifversion fpt or ghec %} ![An image of foo bar for GitHub Free, GitHub Pro, GitHub Team, and GitHub Enterprise Cloud](/assets/images/foo/bar.png) {% else %} @@ -209,7 +210,8 @@ If an image will change for {% data variables.product.prodname_ghe_server %} 3.1 Your Liquid conditional would look like this: -```{% raw %} +```markdown +{% raw %} {% ifversion fpt or ghec %} ![An image of foo bar](/assets/images/foo/bar.png) {% elsif ghes < 3.10 %} diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md b/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md index c7b7ad38c286..2f63af7dac27 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.md @@ -50,7 +50,7 @@ When referencing the URL of a label in Markdown, the label is automatically rend The URL of a label can be found by navigating to the labels page and clicking on a label. For example, the URL of the label "enhancement" in our public [docs repository](https://github.com/github/docs/) is -```md +```markdown https://github.com/github/docs/labels/enhancement ``` diff --git a/content/github-cli/github-cli/creating-github-cli-extensions.md b/content/github-cli/github-cli/creating-github-cli-extensions.md index 4d97b6020349..5b8d6097981a 100644 --- a/content/github-cli/github-cli/creating-github-cli-extensions.md +++ b/content/github-cli/github-cli/creating-github-cli-extensions.md @@ -190,7 +190,7 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g 1. In the directory you created, add some source code. For example: - ```go + ```golang package main import ( "github.com/cli/go-gh" diff --git a/content/rest/guides/encrypting-secrets-for-the-rest-api.md b/content/rest/guides/encrypting-secrets-for-the-rest-api.md index 5590b5b363a0..81b98c369090 100644 --- a/content/rest/guides/encrypting-secrets-for-the-rest-api.md +++ b/content/rest/guides/encrypting-secrets-for-the-rest-api.md @@ -72,7 +72,7 @@ If you are using C#, you can encrypt your secret using the Sodium.Core package. In the following example, replace `YOUR_SECRET` with the plain text value that you want to encrypt. Replace `YOUR_BASE64_KEY` with your Base64 encoded public key. The documentation for the endpoint that you will use to create a secret will tell you which endpoint you can use to get the public key. -```C# copy +```csharp copy var secretValue = System.Text.Encoding.UTF8.GetBytes("YOUR_SECRET"); var publicKey = Convert.FromBase64String("YOUR_BASE64_KEY"); diff --git a/data/reusables/README.md b/data/reusables/README.md index edf52190e09c..ca692e531d59 100644 --- a/data/reusables/README.md +++ b/data/reusables/README.md @@ -18,7 +18,7 @@ Indented reusables require a special liquid tag: `indented_data_reference` which For example, to indent `/data/reusables/foo/bar.md` in an ordered list, you could: -```md +```markdown 1. My first list item {% indented_data_reference reusables.foo.par spaces=2 %} 1. My second list item diff --git a/src/content-render/README.md b/src/content-render/README.md index 62788f01b9cb..ab013400f2dc 100644 --- a/src/content-render/README.md +++ b/src/content-render/README.md @@ -4,7 +4,7 @@ In this directory is the main pipeline that converts our content from Liquid, Ma ## Usage -```js +```javascript const renderContent = require('.') const html = await renderContent(` diff --git a/src/redirects/README.md b/src/redirects/README.md index 5f23c71fc649..e0a1f07ecf32 100644 --- a/src/redirects/README.md +++ b/src/redirects/README.md @@ -28,7 +28,7 @@ In the `handle-redirects.js` middleware, the language part of the URL is removed, looked up, and if matched to something, redirects with language put back in. Demonstrated with pseudo code: -```js +```javascript var fullPath = '/ja/foo' var newPath = redirects['/foo'] if (newPath) { diff --git a/src/search/README.md b/src/search/README.md index 136f19f11a7a..2dfabacc71cc 100644 --- a/src/search/README.md +++ b/src/search/README.md @@ -108,7 +108,7 @@ Index Name | Description Each record represents a section of a page. Sections are derived by splitting up pages by their headings. Each record has a `title`, `intro` (if one exists in the frontmatter), `body` content (in text, not HTML), a `url`, and a unique `objectID` that is currently just the permalink of the article. Here's an example: -```js +```javascript { objectID: '/en/actions/creating-actions/about-actions#about-actions', url: 'https://docs.github.com/en/actions/creating-actions/about-actions#about-actions',