Skip to content

Commit e40757a

Browse files
Copilothawkeyexl
andcommitted
Fix URL encoding in schema reference links
Co-authored-by: hawkeyexl <[email protected]>
1 parent c476419 commit e40757a

33 files changed

+73
-71
lines changed

.scripts/buildSchemaReferencesV4.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ async function main() {
417417
// For top-level schemas or schemas with titles
418418
fileName = `${schemaId}.md`;
419419
}
420-
schemaPaths.set(schemaId, `/docs/references/schemas/${fileName.replace('.md', '')}`);
420+
const pathWithoutExt = fileName.replace('.md', '');
421+
const encodedPath = encodeURIComponent(pathWithoutExt);
422+
schemaPaths.set(schemaId, `/docs/references/schemas/${encodedPath}`);
421423
}
422424
}
423425

docs/references/schemas/Browser.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Browser configuration.
66
## Referenced In
77

88
- [context](/docs/references/schemas/context)
9-
- [Resolved context](/docs/references/schemas/Resolved context)
9+
- [Resolved context](/docs/references/schemas/Resolved%20context)
1010

1111
## Fields
1212

1313
Field | Type | Description | Default
1414
:-- | :-- | :-- | :--
1515
name | string | Required. Name of the browser.<br/><br/>Accepted values: `chrome`, `firefox`, `safari`, `webkit` |
1616
headless | boolean | Optional. If `true`, runs the browser in headless mode. | `true`
17-
window | object([Browser Window](/docs/references/schemas/Browser Window)) | Optional. Browser dimensions. |
18-
viewport | object([Browser Viewport](/docs/references/schemas/Browser Viewport)) | Optional. Viewport dimensions. |
17+
window | object([Browser Window](/docs/references/schemas/Browser%20Window)) | Optional. Browser dimensions. |
18+
viewport | object([Browser Viewport](/docs/references/schemas/Browser%20Viewport)) | Optional. Viewport dimensions. |
1919

2020
## Examples
2121

docs/references/schemas/Capture screenshot (detailed).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ directory | string | Optional. Directory of the PNG file. If the directory doesn
1616
maxVariation | number | Optional. Allowed variation in percentage of pixels between the new screenshot and the existing screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.<br/><br/>Minimum: 0. Maximum: 1 | `0.05`
1717
overwrite | string | Optional. If `true`, overwrites the existing screenshot at `path` if it exists.
1818
If `aboveVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.<br/><br/>Accepted values: `true`, `false`, `aboveVariation` | `aboveVariation`
19-
crop | one of:<br/>- string<br/>- object([Crop by element (detailed)](/docs/references/schemas/Crop by element (detailed))) | Optional. No description provided. |
19+
crop | one of:<br/>- string<br/>- object([Crop by element (detailed)](/docs/references/schemas/Crop%20by%20element%20(detailed))) | Optional. No description provided. |
2020

2121
## Examples
2222

docs/references/schemas/Click element (detailed).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
## Referenced In
77

88
- [click](/docs/references/schemas/click)
9-
- [Find element (detailed)](/docs/references/schemas/Find element (detailed))
9+
- [Find element (detailed)](/docs/references/schemas/Find%20element%20(detailed))
1010

1111
## Fields
1212

docs/references/schemas/Common.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
## Referenced In
77

8-
- [Markup definition](/docs/references/schemas/Markup definition)
8+
- [Markup definition](/docs/references/schemas/Markup%20definition)
99
- [test](/docs/references/schemas/test)
10-
- [Resolved context](/docs/references/schemas/Resolved context)
10+
- [Resolved context](/docs/references/schemas/Resolved%20context)
1111

1212
## Fields
1313

docs/references/schemas/Crop by element (detailed).md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ Crop the screenshot to a specific element.
55

66
## Referenced In
77

8-
- [Capture screenshot (detailed)](/docs/references/schemas/Capture screenshot (detailed))
8+
- [Capture screenshot (detailed)](/docs/references/schemas/Capture%20screenshot%20(detailed))
99

1010
## Fields
1111

1212
Field | Type | Description | Default
1313
:-- | :-- | :-- | :--
1414
elementText | string | Optional. Display text of the element to screenshot. |
1515
selector | string | Optional. Selector of the element to screenshot. |
16-
padding | one of:<br/>- number<br/>- object([Padding (detailed)](/docs/references/schemas/Padding (detailed))) | Optional. No description provided. |
16+
padding | one of:<br/>- number<br/>- object([Padding (detailed)](/docs/references/schemas/Padding%20(detailed))) | Optional. No description provided. |
1717

1818
## Examples
1919

docs/references/schemas/File type (custom).md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Field | Type | Description | Default
1414
name | string | Optional. Name of the file type. |
1515
extends | string | Optional. Base template to extend.<br/><br/>Accepted values: `markdown`, `asciidoc`, `html` |
1616
extensions | one of:<br/>- string<br/>- array of string | Required. File extensions to use with type. |
17-
inlineStatements | object([Inline statement definition](/docs/references/schemas/Inline statement definition)) | Optional. Statements to include tests and steps inside the content of the file, such as within Markdown. |
18-
markup | array of object([Markup definition](/docs/references/schemas/Markup definition)) | Optional. Markup definitions for the file type. |
17+
inlineStatements | object([Inline statement definition](/docs/references/schemas/Inline%20statement%20definition)) | Optional. Statements to include tests and steps inside the content of the file, such as within Markdown. |
18+
markup | array of object([Markup definition](/docs/references/schemas/Markup%20definition)) | Optional. Markup definitions for the file type. |
1919

2020
## Examples
2121

docs/references/schemas/File type (executable).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
Field | Type | Description | Default
1313
:-- | :-- | :-- | :--
1414
extensions | one of:<br/>- string<br/>- array of string | Required. File extensions to use with type. |
15-
runShell | one of:<br/>- string<br/>- object([Run shell command (detailed)](/docs/references/schemas/Run shell command (detailed))) | Optional. `runShell` step to perform for this file type. Use $1 as a placeholder for the file path. |
15+
runShell | one of:<br/>- string<br/>- object([Run shell command (detailed)](/docs/references/schemas/Run%20shell%20command%20(detailed))) | Optional. `runShell` step to perform for this file type. Use $1 as a placeholder for the file path. |
1616

1717
## Examples

docs/references/schemas/Find element (detailed).md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ elementText | string | Optional. Display text of the element to find. If combine
1515
selector | string | Optional. Selector of the element to find. If combined with `elementText`, the element must match both the text and the selector. |
1616
timeout | integer | Optional. Max duration in milliseconds to wait for the element to exist. | `5000`
1717
moveTo | boolean | Optional. Move to the element. If the element isn't visible, it's scrolled into view. | `true`
18-
click | one of:<br/>- one of:<br/>- string<br/>- object([Click element (detailed)](/docs/references/schemas/Click element (detailed)))<br/>- boolean<br/>- object([Find element and click](/docs/references/schemas/Find element and click)) | Optional. Click the element. |
18+
click | one of:<br/>- one of:<br/>- string<br/>- object([Click element (detailed)](/docs/references/schemas/Click%20element%20(detailed)))<br/>- boolean<br/>- object([Find element and click](/docs/references/schemas/Find%20element%20and%20click)) | Optional. Click the element. |
1919
type | unknown | Optional. Type keys after finding the element. Either a string or an object with a `keys` field as defined in [`type`](type). To type in the element, make the element active with the `click` parameter. |
2020

2121
## Examples

docs/references/schemas/Find element and click.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
## Referenced In
77

8-
- [Find element (detailed)](/docs/references/schemas/Find element (detailed))
8+
- [Find element (detailed)](/docs/references/schemas/Find%20element%20(detailed))
99

1010
## Fields
1111

0 commit comments

Comments
 (0)