You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MarkdownGuide.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,14 +61,6 @@ Use italics to introduce a new term or concept. To emphasize a word or phrase, u
61
61
- This is the basis of potential *write skew anomalies*.
62
62
- 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.
63
63
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
-
72
64
## Links
73
65
74
66
### Links between CockroachDB docs pages
@@ -130,59 +122,68 @@ For websites that automatically localize pages, avoid using localization element
130
122
- Instead of `https://docs.github.com/**en/**graphql/overview/explorer`, use `https://docs.github.com/graphql/overview/explorer`.
131
123
- Instead of `https://en.wikipedia.org/wiki/SQL:2011`, use `https://www.wikipedia.org/wiki/SQL:2011` or `https://wikipedia.org/wiki/SQL:2011`.
132
124
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.
134
132
135
-
### Basic syntax
133
+
### Code block
136
134
137
135
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.
138
136
139
-
~~~markdown
137
+
```
138
+
This is a sample line of text.
140
139
141
-
~~~
142
-
Code goes here
140
+
{% include_cached copy-clipboard.html %}
141
+
~~~ shell
142
+
$ go get -u github.com/lib/pq
143
143
~~~
144
144
145
-
~~~
145
+
This is more sample text.
146
+
```
146
147
147
148
### Language highlighting
148
149
149
150
A code block supports syntax highlighting if you add the language name (`shell`, `sql`, `json`, etc.) immediately after the first line of tildes.
150
151
151
-
~~~markdown
152
+
```
152
153
~~~sql
153
154
SELECT * FROM users;
154
155
~~~
155
-
~~~
156
+
```
156
157
157
-
~~~markdown
158
+
```
158
159
~~~shell
159
160
$ cockroach start --insecure
160
161
~~~
161
-
~~~
162
+
```
162
163
163
164
### Multi-line samples
164
165
165
166
For multi-line commands, use a backslash (`\`) at the end of each line to indicate a line break.
166
167
167
-
~~~markdown
168
+
```
168
169
~~~shell
169
170
$ cockroach start \
170
171
--insecure \
171
172
--store=node1 \
172
173
--listen-addr=localhost:26257
173
174
~~~
174
-
~~~
175
+
```
175
176
176
177
### Copy to clipboard
177
178
178
179
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:
0 commit comments