Skip to content

Commit 4bbf584

Browse files
BridgeARtargos
authored andcommitted
doc: use code markup/markdown in headers
This also allows us to remove backslash escaping for `[` and `]` inside of header code, which makes the bare markdown more readable. Refs: #31086 PR-URL: #31149 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 725daeb commit 4bbf584

File tree

5 files changed

+141
-99
lines changed

5 files changed

+141
-99
lines changed

CPP_STYLE_GUIDE.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ codebase not related to stylistic issues.
1414
* [Align function arguments vertically](#align-function-arguments-vertically)
1515
* [Initialization lists](#initialization-lists)
1616
* [CamelCase for methods, functions, and classes](#camelcase-for-methods-functions-and-classes)
17-
* [snake\_case for local variables and parameters](#snake_case-for-local-variables-and-parameters)
18-
* [snake\_case\_ for private class fields](#snake_case_-for-private-class-fields)
19-
* [snake\_case for C-like structs](#snake_case-for-c-like-structs)
17+
* [`snake_case` for local variables and parameters](#snake_case-for-local-variables-and-parameters)
18+
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
19+
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
2020
* [Space after `template`](#space-after-template)
2121
* [Memory Management](#memory-management)
2222
* [Memory allocation](#memory-allocation)
@@ -155,15 +155,15 @@ class FooBar {
155155
};
156156
```
157157

158-
### snake\_case for local variables and parameters
158+
### `snake_case` for local variables and parameters
159159

160160
```c++
161161
int FunctionThatDoesSomething(const char* important_string) {
162162
const char* pointer_into_string = important_string;
163163
}
164164
```
165165
166-
### snake\_case\_ for private class fields
166+
### `snake_case_` for private class fields
167167
168168
```c++
169169
class Foo {
@@ -172,8 +172,9 @@ class Foo {
172172
};
173173
```
174174

175-
### snake\_case for C-like structs
176-
For plain C-like structs snake_case can be used.
175+
### `snake_case` for C-like structs
176+
177+
For `plain C-like structs snake_case can be used.
177178

178179
```c++
179180
struct foo_bar {

benchmark/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,21 @@ The common.js module is used by benchmarks for consistency across repeated
7474
tasks. It has a number of helpful functions and properties to help with
7575
writing benchmarks.
7676

77-
### createBenchmark(fn, configs\[, options\])
77+
### `createBenchmark(fn, configs[, options])`
7878

7979
See [the guide on writing benchmarks](writing-and-running-benchmarks.md#basics-of-a-benchmark).
8080

81-
### default\_http\_benchmarker
81+
### `default_http_benchmarker`
8282

8383
The default benchmarker used to run HTTP benchmarks.
8484
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).
8585

86-
### PORT
86+
### `PORT`
8787

8888
The default port used to run HTTP benchmarks.
8989
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).
9090

91-
### sendResult(data)
91+
### `sendResult(data)`
9292

9393
Used in special benchmarks that can't use `createBenchmark` and the object
9494
it returns to accomplish what they need. This function reports timing

doc/api/fs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5073,7 +5073,7 @@ changes:
50735073

50745074
The `Promise` is resolved with the [`fs.Stats`][] object for the given `path`.
50755075

5076-
### `fsPromises.symlink(target, path\[, type\])`
5076+
### `fsPromises.symlink(target, path[, type])`
50775077
<!-- YAML
50785078
added: v10.0.0
50795079
-->

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3249,7 +3249,7 @@ const server = http2.createServer((req, res) => {
32493249
});
32503250
```
32513251

3252-
#### `response.setTimeout(msecs\[, callback\])`
3252+
#### `response.setTimeout(msecs[, callback])`
32533253
<!-- YAML
32543254
added: v8.4.0
32553255
-->

0 commit comments

Comments
 (0)