Skip to content

Commit ecbde50

Browse files
committed
fix rendering issue
1 parent 466b397 commit ecbde50

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

MarkdownGuide.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ Use italics to introduce a new term or concept. To emphasize a word or phrase, u
6161
- This is the basis of potential *write skew anomalies*.
6262
- Every table in a multi-region database has a "table locality setting" that configures one or more *home regions* at the table or row level.
6363

64-
### Inline code
65-
66-
Use inline code when referring to code, commands, or other technical syntax within a sentence. Inline `code` is surrounded by backticks (``).
67-
68-
**Example:** The `CREATE TABLE` statement creates a new table in a database.
69-
70-
For guidance on code blocks, refer to [Code blocks](#code-blocks).
71-
7264
## Links
7365

7466
### Links between CockroachDB docs pages
@@ -130,59 +122,68 @@ For websites that automatically localize pages, avoid using localization element
130122
- Instead of `https://docs.github.com/**en/**graphql/overview/explorer`, use `https://docs.github.com/graphql/overview/explorer`.
131123
- Instead of `https://en.wikipedia.org/wiki/SQL:2011`, use `https://www.wikipedia.org/wiki/SQL:2011` or `https://wikipedia.org/wiki/SQL:2011`.
132124

133-
## Code blocks
125+
## Code
126+
127+
### Inline code
128+
129+
Use inline code when referring to code, commands, or other technical syntax within a sentence. Inline `code` is surrounded by backticks (``).
130+
131+
**Example:** The `CREATE TABLE` statement creates a new table in a database.
134132

135-
### Basic syntax
133+
### Code block
136134

137135
Use a code block to provide executable code samples. A code block has an opening and closing set of 3 tildes (`~~~`). There should be one returned line before and after a code block, for better Markdown readability.
138136

139-
~~~markdown
137+
```
138+
This is a sample line of text.
140139
141-
~~~
142-
Code goes here
140+
{% include_cached copy-clipboard.html %}
141+
~~~ shell
142+
$ go get -u github.com/lib/pq
143143
~~~
144144
145-
~~~
145+
This is more sample text.
146+
```
146147

147148
### Language highlighting
148149

149150
A code block supports syntax highlighting if you add the language name (`shell`, `sql`, `json`, etc.) immediately after the first line of tildes.
150151

151-
~~~markdown
152+
```
152153
~~~sql
153154
SELECT * FROM users;
154155
~~~
155-
~~~
156+
```
156157

157-
~~~markdown
158+
```
158159
~~~shell
159160
$ cockroach start --insecure
160161
~~~
161-
~~~
162+
```
162163

163164
### Multi-line samples
164165

165166
For multi-line commands, use a backslash (`\`) at the end of each line to indicate a line break.
166167

167-
~~~markdown
168+
```
168169
~~~shell
169170
$ cockroach start \
170171
--insecure \
171172
--store=node1 \
172173
--listen-addr=localhost:26257
173174
~~~
174-
~~~
175+
```
175176

176177
### Copy to clipboard
177178

178179
Many of our code blocks are written so users can copy and paste them directly into a terminal. To make that easier, add the **Copy to Clipboard** button by placing `{% include_cached copy-clipboard.html %}` on the line directly preceding the code block:
179180

180-
~~~markdown
181+
```
181182
{% include_cached copy-clipboard.html %}
182183
~~~shell
183184
$ go get -u github.com/lib/pq
184185
~~~
185-
~~~
186+
```
186187

187188
Notes for usage:
188189

0 commit comments

Comments
 (0)