Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: use code markup/markdown in headers #31149

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions CPP_STYLE_GUIDE.md
Expand Up @@ -14,9 +14,9 @@ codebase not related to stylistic issues.
* [Align function arguments vertically](#align-function-arguments-vertically)
* [Initialization lists](#initialization-lists)
* [CamelCase for methods, functions, and classes](#camelcase-for-methods-functions-and-classes)
* [snake\_case for local variables and parameters](#snake_case-for-local-variables-and-parameters)
* [snake\_case\_ for private class fields](#snake_case_-for-private-class-fields)
* [snake\_case for C-like structs](#snake_case-for-c-like-structs)
* [`snake_case` for local variables and parameters](#snake_case-for-local-variables-and-parameters)
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
* [Space after `template`](#space-after-template)
* [Memory Management](#memory-management)
* [Memory allocation](#memory-allocation)
Expand Down Expand Up @@ -155,15 +155,15 @@ class FooBar {
};
```

### snake\_case for local variables and parameters
### `snake_case` for local variables and parameters

```c++
int FunctionThatDoesSomething(const char* important_string) {
const char* pointer_into_string = important_string;
}
```
### snake\_case\_ for private class fields
### `snake_case_` for private class fields
```c++
class Foo {
Expand All @@ -172,8 +172,9 @@ class Foo {
};
```

### snake\_case for C-like structs
For plain C-like structs snake_case can be used.
### `snake_case` for C-like structs

For `plain C-like structs snake_case can be used.

```c++
struct foo_bar {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/README.md
Expand Up @@ -74,21 +74,21 @@ The common.js module is used by benchmarks for consistency across repeated
tasks. It has a number of helpful functions and properties to help with
writing benchmarks.

### createBenchmark(fn, configs\[, options\])
### `createBenchmark(fn, configs[, options])`

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

### default\_http\_benchmarker
### `default_http_benchmarker`

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

### PORT
### `PORT`

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

### sendResult(data)
### `sendResult(data)`

Used in special benchmarks that can't use `createBenchmark` and the object
it returns to accomplish what they need. This function reports timing
Expand Down
2 changes: 1 addition & 1 deletion doc/api/fs.md
Expand Up @@ -5093,7 +5093,7 @@ changes:

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

### `fsPromises.symlink(target, path\[, type\])`
### `fsPromises.symlink(target, path[, type])`
<!-- YAML
added: v10.0.0
-->
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http2.md
Expand Up @@ -3233,7 +3233,7 @@ const server = http2.createServer((req, res) => {
});
```

#### `response.setTimeout(msecs\[, callback\])`
#### `response.setTimeout(msecs[, callback])`
<!-- YAML
added: v8.4.0
-->
Expand Down