-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
fix: syntax errors in JS example sections (v3) #18307
fix: syntax errors in JS example sections (v3) #18307
Conversation
@@ -77,7 +77,7 @@ The [x](https://svgwg.org/svg2-draft/geometry.html#XProperty) property describes | |||
|
|||
A \<coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for [\<length>](https://www.w3.org/TR/SVG11/types.html#DataTypeLength) | |||
|
|||
```js | |||
```go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire code block seems to be taken from svgo:
https://github.com/ajstarks/svgo/blob/1546f124cd8b0cba8d505fa2ddb110c211670c59/svg.go#L317-L321
highWaterMark, | ||
size() | ||
highWaterMark: 3, | ||
size: () => 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example taken from https://streams.spec.whatwg.org/#example-simple-queuing-strategy
@@ -28,7 +28,7 @@ The constant `sanitized` is an object created via a Trusted Types policy. | |||
|
|||
```js | |||
const sanitized = scriptPolicy.createScriptURL("https://example.com/my-script.js"); | |||
console.log(sanitized;) /* a TrustedScriptURL object */ | |||
console.log(sanitize); /* a TrustedScriptURL object */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be sanitized
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, you're absolutely right. One backspace too much 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits that I will commit soon.
I find this really amazing: so many small errors fixed really quickly.
Summary
Followup to PR #18186 and #18191
Skipped issues (POTENTIALLY OUTDATED, SEE #18186 (comment)):
catch
block{{deprecated_inline}}
inside code blockParsing error: Unexpected token :
At this point I might as well open an issue to track all the syntax issues I skipped
This PR…
-->