Skip to content

Clarify documentation for node.source.end.offset#2032

Merged
ai merged 3 commits intopostcss:mainfrom
mizdra:improve-documentation-for-end-offset
Apr 12, 2025
Merged

Clarify documentation for node.source.end.offset#2032
ai merged 3 commits intopostcss:mainfrom
mizdra:improve-documentation-for-end-offset

Conversation

@mizdra
Copy link
Contributor

@mizdra mizdra commented Mar 22, 2025

ref: #2030

The behavior of node.source.end.offset is confusing to users. I want to reduce this confusion. So I have tried to describe the behavior in the documentation.

lib/node.d.ts Outdated
* The inclusive ending position for the source
* code of a node.
*
* However, only `end.offset` may be an exclusive position.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording is not very clear for everyone. I think it is better replace exclusive and inclusive words and show just an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about c9b73ec?

@ai ai merged commit 94b5260 into postcss:main Apr 12, 2025
9 checks passed
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