Skip to content

docs: fix invalid JS in writing-a-plugin examples - #2107

Merged
ai merged 1 commit into
postcss:mainfrom
lenoxfernando:docs/fix-plugin-guide-syntax
Jul 3, 2026
Merged

ai merged 1 commit into
postcss:mainfrom
lenoxfernando:docs/fix-plugin-guide-syntax

Conversation

@lenoxfernando

Copy link
Copy Markdown
Contributor

Three snippets in docs/writing-a-plugin.md don't parse as JavaScript:

  1. In the Declaration visitor example, a comma is missing between the color and '*' handlers.
  2. Two examples use name: (args) { — property syntax mixed with a method body; they need an arrow (=> {).

All three now copy-paste cleanly.

Found while running docrot, a small checker that verifies docs examples and links against the code. Happy to adjust anything.

@ai
ai merged commit 2d44be0 into postcss:main Jul 3, 2026
@ai

ai commented Jul 3, 2026

Copy link
Copy Markdown
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants