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

Fix invalid GFM alert syntax, new markdownlint rule #35344

Merged
merged 6 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .markdownlint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,18 @@
"searchScope": "text",
},
{
"name": "gfm-blockquote",
"name": "gfm-alert",
"message": "Use the GFM syntax: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN#notes_warnings_and_callouts",
"searchPattern": "/^ *> \\*\\*(Note|Warning|Callout):\\*\\*(?! [[{`_*])/gm",
"searchScope": "text",
},
{
"name": "bad-gfm-alert",
"message": "Use the correct GFM syntax: `> [!NOTE]`",
// TODO this should use the modifier syntax; until it has better Node support
"searchPattern": "/^ *> !?\\[!?((?!NOTE)[Nn][Oo][Tt][Ee]|(?!WARNING)[Ww][Aa][Rr][Nn][Ii][Nn][Gg]|(?!CALLOUT)[Cc][Aa][Ll][Ll][Oo][Uu][Tt])\\]\\n|^ *> (?!\\[!)!?\\[!?(NOTE|WARNING|CALLOUT)\\]\\n/gm",
"searchScope": "text",
},
],
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The anchor-positioned element is given fixed positioning and tethered to the anc
}
```

> ![NOTE]
> [!NOTE]
> When multiple position try fallback options are specified, they are separated by commas, and tried in the order they are specified.

Try scrolling the demo so that the anchor starts to get near the edges:
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/svg/attribute/cx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For {{SVGElement('circle')}}, `cx` defines the x-axis coordinate of the center o
</tbody>
</table>

> [!Note]
> [!NOTE]
> The x-axis coordinate of the center of the `<circle>` can also be defined with the {{cssxref("cx")}} _geometry property_. If set in CSS, the `cx` property value overrides the `cx` attribute value.

## ellipse
Expand All @@ -90,7 +90,7 @@ For {{SVGElement('ellipse')}}, `cx` defines the x-axis coordinate of the center
</tbody>
</table>

> [!Note]
> [!NOTE]
> The x-axis coordinate of the center of the `<ellipse>` can also be defined with the {{cssxref("cx")}} _geometry property_. If set in CSS, the `cx` property value overrides the `cx` attribute value.

## radialGradient
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/svg/attribute/cy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ For {{SVGElement('circle')}}, `cy` defines the y-axis coordinate of the center o
</tbody>
</table>

> [!Note]
> [!NOTE]
> The y-axis coordinate of the center of the `<circle>` can also be defined with the {{cssxref("cy")}} _geometry property_. If set in CSS, the `cy` property value overrides the `cy` attribute value.

## ellipse
Expand All @@ -90,7 +90,7 @@ For {{SVGElement('ellipse')}}, `cy` defines the y-axis coordinate of the center
</tbody>
</table>

> [!Note]
> [!NOTE]
> The y-axis coordinate of the center of the `<ellipse>` can also be defined with the {{cssxref("cy")}} _geometry property_. If set in CSS, the `cy` property value overrides the `cy` attribute value.

## radialGradient
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/svg/attribute/r/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For {{SVGElement('circle')}}, `r` defines the radius of the circle and therefor
</tbody>
</table>

> [!Note]
> [!NOTE]
> The radius size of a `<circle>` can also be defined with the {{cssxref("r")}} _geometry property_.

## radialGradient
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/svg/attribute/rx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For {{SVGElement('ellipse')}}, `rx` defines the x-radius of the shape. With a va
</tbody>
</table>

> [!Note]
> [!NOTE]
> The x-radius of the `<ellipse>` can also be defined with the {{cssxref("rx")}} _geometry property_. If set in CSS, the `rx` property value overrides the `rx` attribute value.

## rect
Expand Down Expand Up @@ -115,7 +115,7 @@ The way the value of the `rx` attribute is interpreted depend on both the {{SVGA
</tbody>
</table>

> [!Note]
> [!NOTE]
> The horizontal curve of the corners of the `<rect>` can also be defined with the {{cssxref("rx")}} _geometry property_. If set in CSS, the `rx` property value overrides the `rx` attribute value.

## Specifications
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/svg/attribute/ry/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For {{SVGElement('ellipse')}}, `ry` defines the y-radius of the shape. With a va
</tbody>
</table>

> [!Note]
> [!NOTE]
> The y-radius of the `<ellipse>` can also be defined with the {{cssxref("ry")}} _geometry property_. If set in CSS, the `ry` property value overrides the `ry` attribute value.

## rect
Expand Down Expand Up @@ -115,7 +115,7 @@ The way the value of the `ry` attribute is interpreted depend on both the {{SVGA
</tbody>
</table>

> [!Note]
> [!NOTE]
> The vertical curve of the corners of the `<rect>` can also be defined with the {{cssxref("ry")}} _geometry property_. If set in CSS, the `ry` property value overrides the `ry` attribute value.

## Specifications
Expand Down
10 changes: 5 additions & 5 deletions files/en-us/web/svg/attribute/y/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ For {{SVGElement('foreignObject')}}, `y` defines the y coordinate of the upper l
</tbody>
</table>

> ![NOTE]
> [!NOTE]
> The y-axis coordinate of the `<foreignObject>` can also be defined with the {{cssxref("y")}} _geometry property_. If set in CSS, the `y` property value overrides the `y` attribute value.

### `<glyphRef>`
Expand Down Expand Up @@ -933,7 +933,7 @@ For {{SVGElement('image')}}, `y` defines the y coordinate of the upper left corn
</tbody>
</table>

> ![NOTE]
> [!NOTE]
> The y-axis coordinate of the `<image>` can also be defined with the {{cssxref("y")}} _geometry property_. If set in CSS, the `y` property value overrides the `y` attribute value.

### `<mask>`
Expand Down Expand Up @@ -1029,7 +1029,7 @@ For {{SVGElement('rect')}}, `y` defines the y coordinate of the upper left corne
</tbody>
</table>

> ![NOTE]
> [!NOTE]
> The y-axis coordinate of the `<rect>` can also be defined with the {{cssxref("y")}} _geometry property_. If set in CSS, the `y` property value overrides the `y` attribute value.

### `<svg>`
Expand Down Expand Up @@ -1065,7 +1065,7 @@ For {{SVGElement('svg')}}, `y` defines the y coordinate of the upper left corner
</tbody>
</table>

> ![NOTE]
> [!NOTE]
> The y-axis coordinate of the `<svg>` can also be defined with the {{cssxref("y")}} _geometry property_. If set in CSS, the `y` property value overrides the `y` attribute value.

### `<text>`
Expand Down Expand Up @@ -1295,7 +1295,7 @@ For {{SVGElement('use')}}, `y` defines the y coordinate of the upper left corner
</tbody>
</table>

> ![NOTE]
> [!NOTE]
> Declaring a `<length>` or `<percentage>` value in CSS using the {{cssxref("y")}} _geometry property_ overrides the y-axis coordinate of the `<use>` set by the `y` attribute in some browsers. This behavior is at-risk.

## Examples
Expand Down