fix incorrect code languages
This commit is contained in:
@@ -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')
|
||||
```
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ redirect_from:
|
||||
|
||||

|
||||
|
||||
```JSON
|
||||
```json
|
||||
"features": {
|
||||
...
|
||||
"ghcr.io/devcontainers/features/terraform:1": {},
|
||||
@@ -43,7 +43,7 @@ redirect_from:
|
||||
|
||||

|
||||
|
||||
```JSON
|
||||
```json
|
||||
"features": {
|
||||
...
|
||||
"ghcr.io/devcontainers/features/terraform:1": {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 %}
|
||||

|
||||
{% 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 %}
|
||||

|
||||
{% elsif ghes < 3.10 %}
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(`
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user