chore: disallow shortcut reference links in docs Markdown (#36860)

* chore: disallow shortcut reference links in docs Markdown

* docs: clean up shortcut-style links
This commit is contained in:
David Sanders 2023-01-16 01:22:49 -08:00 committed by GitHub
parent a9e7bb0027
commit d94f35a8f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 199 additions and 171 deletions

View file

@ -84,16 +84,16 @@ Examples of valid `color` values:
* #ffffff (RRGGBB)
* #ffffffff (AARRGGBB)
* RGB
* rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)
* rgb\((\[\d]+),\s*(\[\d]+),\s*(\[\d]+)\)
* e.g. rgb(255, 255, 255)
* RGBA
* rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)
* rgba\((\[\d]+),\s*(\[\d]+),\s*(\[\d]+),\s*(\[\d.]+)\)
* e.g. rgba(255, 255, 255, 1.0)
* HSL
* hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)
* hsl\((-?\[\d.]+),\s*(\[\d.]+)%,\s*(\[\d.]+)%\)
* e.g. hsl(200, 20%, 50%)
* HSLA
* hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)
* hsla\((-?\[\d.]+),\s*(\[\d.]+)%,\s*(\[\d.]+)%,\s*(\[\d.]+)\)
* e.g. hsla(200, 20%, 50%, 0.5)
* Color name
* Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148)

View file

@ -1048,16 +1048,16 @@ Examples of valid `backgroundColor` values:
* #ffffff (RGB)
* #ffffffff (ARGB)
* RGB
* rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\)
* rgb\((\[\d]+),\s*(\[\d]+),\s*(\[\d]+)\)
* e.g. rgb(255, 255, 255)
* RGBA
* rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\)
* rgba\((\[\d]+),\s*(\[\d]+),\s*(\[\d]+),\s*(\[\d.]+)\)
* e.g. rgba(255, 255, 255, 1.0)
* HSL
* hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\)
* hsl\((-?\[\d.]+),\s*(\[\d.]+)%,\s*(\[\d.]+)%\)
* e.g. hsl(200, 20%, 50%)
* HSLA
* hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)
* hsla\((-?\[\d.]+),\s*(\[\d.]+)%,\s*(\[\d.]+)%,\s*(\[\d.]+)\)
* e.g. hsla(200, 20%, 50%, 0.5)
* Color name
* Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148)
@ -1541,7 +1541,7 @@ Remove the window's menu bar.
* `options` Object (optional)
* `mode` string _Windows_ - Mode for the progress bar. Can be `none`, `normal`, `indeterminate`, `error` or `paused`.
Sets progress value in progress bar. Valid range is [0, 1.0].
Sets progress value in progress bar. Valid range is \[0, 1.0].
Remove progress bar when progress < 0;
Change to indeterminate mode when progress > 1.
@ -1587,7 +1587,7 @@ Returns `boolean` - Whether the window has a shadow.
* `opacity` number - between 0.0 (fully transparent) and 1.0 (fully opaque)
Sets the opacity of the window. On Linux, does nothing. Out of bound number
values are clamped to the [0, 1] range.
values are clamped to the \[0, 1] range.
#### `win.getOpacity()`

View file

@ -61,7 +61,7 @@ throttling in one window, you can take the hack of
Forces the maximum disk space to be used by the disk cache, in bytes.
### --enable-logging[=file]
### --enable-logging\[=file]
Prints Chromium's logging to stderr (or a log file).
@ -241,19 +241,19 @@ Electron supports some of the [CLI flags][node-cli] supported by Node.js.
**Note:** Passing unsupported command line switches to Electron when it is not running in `ELECTRON_RUN_AS_NODE` will have no effect.
### --inspect-brk[=[host:]port]
### --inspect-brk\[=\[host:]port]
Activate inspector on host:port and break at start of user script. Default host:port is 127.0.0.1:9229.
Aliased to `--debug-brk=[host:]port`.
### --inspect-port=[host:]port
### --inspect-port=\[host:]port
Set the `host:port` to be used when the inspector is activated. Useful when activating the inspector by sending the SIGUSR1 signal. Default host is `127.0.0.1`.
Aliased to `--debug-port=[host:]port`.
### --inspect[=[host:]port]
### --inspect\[=\[host:]port]
Activate inspector on `host:port`. Default is `127.0.0.1:9229`.

View file

@ -1,7 +1,7 @@
# desktopCapturer
> Access information about media sources that can be used to capture audio and
> video from the desktop using the [`navigator.mediaDevices.getUserMedia`] API.
> video from the desktop using the [`navigator.mediaDevices.getUserMedia`][] API.
Process: [Main](../glossary.md#main-process)
@ -59,11 +59,11 @@ function handleError (e) {
```
To capture video from a source provided by `desktopCapturer` the constraints
passed to [`navigator.mediaDevices.getUserMedia`] must include
passed to [`navigator.mediaDevices.getUserMedia`][] must include
`chromeMediaSource: 'desktop'`, and `audio: false`.
To capture both audio and video from the entire desktop the constraints passed
to [`navigator.mediaDevices.getUserMedia`] must include `chromeMediaSource: 'desktop'`,
to [`navigator.mediaDevices.getUserMedia`][] must include `chromeMediaSource: 'desktop'`,
for both `audio` and `video`, but should not include a `chromeMediaSourceId` constraint.
```javascript
@ -101,7 +101,7 @@ The `desktopCapturer` module has the following methods:
Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`DesktopCapturerSource`](structures/desktop-capturer-source.md) objects, each `DesktopCapturerSource` represents a screen or an individual window that can be captured.
**Note** Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher,
which can detected by [`systemPreferences.getMediaAccessStatus`].
which can detected by [`systemPreferences.getMediaAccessStatus`][].
[`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia
[`systemPreferences.getMediaAccessStatus`]: system-preferences.md#systempreferencesgetmediaaccessstatusmediatype-windows-macos

View file

@ -16,7 +16,7 @@ process, it handles asynchronous and synchronous messages sent from a renderer
process (web page). Messages sent from a renderer will be emitted to this
module.
For usage examples, check out the [IPC tutorial].
For usage examples, check out the [IPC tutorial][].
## Sending messages

View file

@ -142,7 +142,7 @@ Returns `any` - The value sent back by the [`ipcMain`](./ipc-main.md) handler.
Send a message to the main process via `channel` and expect a result
synchronously. Arguments will be serialized with the [Structured Clone
Algorithm][SCA], just like [`window.postMessage`], so prototype chains will not be
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
throw an exception.

View file

@ -659,7 +659,7 @@ The `proxyBypassRules` is a comma separated list of rules described below:
Match URLs which are IP address literals.
Examples:
"127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"
"127.0.1", "\[0:0::1]", "\[::1]", "http://\[::1]:99"
* `IP_LITERAL "/" PREFIX_LENGTH_IN_BITS`

View file

@ -187,7 +187,7 @@ Some popular `key` and `type`s are:
* `key` string
* `type` Type - Can be `string`, `boolean`, `integer`, `float`, `double`, `url`, `array` or `dictionary`.
* `value` UserDefaultTypes[Type]
* `value` UserDefaultTypes\[Type]
Set the value of `key` in `NSUserDefaults`.

View file

@ -24,9 +24,9 @@ Process: [Main](../glossary.md#main-process)<br />
`stderr` to either `pipe`, `inherit` or `ignore`. Configuring `stdin` is not supported; `stdin` will
always be ignored.
For example, the supported values will be processed as following:
* `pipe`: equivalent to ['ignore', 'pipe', 'pipe'] (the default)
* `ignore`: equivalent to 'ignore', 'ignore', 'ignore']
* `inherit`: equivalent to ['ignore', 'inherit', 'inherit']
* `pipe`: equivalent to \['ignore', 'pipe', 'pipe'] (the default)
* `ignore`: equivalent to \['ignore', 'ignore', 'ignore']
* `inherit`: equivalent to \['ignore', 'inherit', 'inherit']
* `serviceName` string (optional) - Name of the process that will appear in `name` property of
[`child-process-gone` event of `app`](app.md#event-child-process-gone).
Default is `node.mojom.NodeService`.
@ -90,7 +90,7 @@ the child process exits, then the value is `undefined` after the `exit` event is
#### `child.stdout`
A `NodeJS.ReadableStream | null` that represents the child process's stdout.
If the child was spawned with options.stdio[1] set to anything other than 'pipe', then this will be `null`.
If the child was spawned with options.stdio\[1] set to anything other than 'pipe', then this will be `null`.
When the child process exits, then the value is `null` after the `exit` event is emitted.
```js
@ -105,7 +105,7 @@ child.stdout.on('data', (data) => {
#### `child.stderr`
A `NodeJS.ReadableStream | null` that represents the child process's stderr.
If the child was spawned with options.stdio[2] set to anything other than 'pipe', then this will be `null`.
If the child was spawned with options.stdio\[2] set to anything other than 'pipe', then this will be `null`.
When the child process exits, then the value is `null` after the `exit` event is emitted.
### Instance Events

View file

@ -570,7 +570,7 @@ Returns:
* `finalUpdate` boolean
Emitted when a result is available for
[`webContents.findInPage`] request.
[`webContents.findInPage`](#contentsfindinpagetext-options) request.
#### Event: 'media-started-playing'
@ -1324,7 +1324,7 @@ can be obtained by subscribing to [`found-in-page`](web-contents.md#event-found-
#### `contents.stopFindInPage(action)`
* `action` string - Specifies the action to take place when ending
[`webContents.findInPage`] request.
[`webContents.findInPage`](#contentsfindinpagetext-options) request.
* `clearSelection` - Clear the selection.
* `keepSelection` - Translate the selection into a normal selection.
* `activateSelection` - Focus and click the selection node.
@ -1712,7 +1712,7 @@ app.whenReady().then(() => {
#### `contents.sendToFrame(frameId, channel, ...args)`
* `frameId` Integer | [number, number] - the ID of the frame to send to, or a
* `frameId` Integer | \[number, number] - the ID of the frame to send to, or a
pair of `[processId, frameId]` if the frame is in a different process to the
main frame.
* `channel` string

View file

@ -609,7 +609,7 @@ examples.
### `<webview>.sendToFrame(frameId, channel, ...args)`
* `frameId` [number, number] - `[processId, frameId]`
* `frameId` \[number, number] - `[processId, frameId]`
* `channel` string
* `...args` any[]
@ -909,7 +909,7 @@ webview.addEventListener('close', () => {
Returns:
* `frameId` [number, number] - pair of `[processId, frameId]`.
* `frameId` \[number, number] - pair of `[processId, frameId]`.
* `channel` string
* `args` any[]