Skip to content

css_parse: flush trailing semicolons in CursorCompactWriteSink on drop#908

Merged
keithamus merged 1 commit intomainfrom
csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites
Mar 1, 2026
Merged

css_parse: flush trailing semicolons in CursorCompactWriteSink on drop#908
keithamus merged 1 commit intomainfrom
csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites

Conversation

@keithamus
Copy link
Copy Markdown
Member

@keithamus keithamus commented Mar 1, 2026

Add a Drop impl that flushes pending semicolons at end-of-stream.
Previously, a trailing semicolon (e.g. @import "foo.css";) would be
swallowed because it was still in the pending slot when the sink was
dropped. Trailing whitespace remains discarded.

Also fix the redundant-semicolon KindSet: Colon was incorrectly listed
as a position where semicolons are redundant.

The Drop impl requires callers to scope the sink so it drops before the
output buffer is read — consumer updates follow in a separate commit.

@keithamus keithamus enabled auto-merge (squash) March 1, 2026 11:18
@keithamus keithamus disabled auto-merge March 1, 2026 11:19
@keithamus keithamus force-pushed the csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites branch from f93786f to 8cc5be7 Compare March 1, 2026 11:21
@keithamus keithamus changed the title csskit csskit wasm csskit transform drop cursorcompactwritesink at all call sites css_parse: flush trailing semicolons in CursorCompactWriteSink on drop Mar 1, 2026
@keithamus keithamus enabled auto-merge (squash) March 1, 2026 11:21
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some required steps failed!

@keithamus keithamus force-pushed the csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites branch from 8cc5be7 to ab86478 Compare March 1, 2026 11:27
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some required steps failed!

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some required steps failed!

Add a Drop impl that flushes pending semicolons at end-of-stream.
Previously, a trailing semicolon (e.g. `@import "foo.css";`) would be
swallowed because it was still in the pending slot when the sink was
dropped. Trailing whitespace remains discarded.

Also fix the redundant-semicolon KindSet: Colon was incorrectly listed
as a position where semicolons are redundant.

The Drop impl requires callers to scope the sink so it drops before the
output buffer is read — consumer updates follow in a separate commit.
@keithamus keithamus force-pushed the csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites branch from ab86478 to 6a5ca17 Compare March 1, 2026 12:26
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

All CI jobs have passed. Approving.

@keithamus keithamus merged commit 0d1d0a9 into main Mar 1, 2026
17 checks passed
@keithamus keithamus deleted the csskit-csskit-wasm-csskit-transform-drop-cursorcompactwritesink-at-all-call-sites branch March 1, 2026 12:32
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))

[forcebuild]
@keithamus keithamus mentioned this pull request Mar 1, 2026
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))
- css_ast: Remove StringOrUrl type (#909) ([#909](#909))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))

[forcebuild]
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))
- css_ast: Remove StringOrUrl type (#909) ([#909](#909))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))
- css_ast: Remove StringOrUrl type (#909) ([#909](#909))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))
- csskit_transform: reduce Urls to Strings where possible (#910) ([#910](#910))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))

[forcebuild]
github-actions bot pushed a commit that referenced this pull request Mar 1, 2026
## [0.0.18] - 2026-03-01

### Other Changes
- Chore(deps): update rust crate toml to v1 (#875) ([#875](#875))
- Update css-tokenizer-tests (#887) ([#887](#887))
- Chore(deps): update dependencies (patch) (#900) ([#900](#900))

### Chromashift
- chromashift: Update to support wide-gamut color spaces, out of gamut colors (#877) ([#877](#877))
- chromashift: Implement css-color-4 raytrace gamut mapping (#879) ([#879](#879))
- chromashift: Increase precision of display-p3 to sRGB conversion (#897) ([#897](#897))

### Css_ast
- css_ast: Implement gap rule list (#878) ([#878](#878))
- Regenerate css_ast/src/values from csswg drafts (#881) ([#881](#881))
- css_ast: Implement ColorMix (#889) ([#889](#889))
- css_ast: Boxup more types (#890) ([#890](#890))
- Implement ColorFunctionColor::to_chromashift() and extract shortest_color helper (#898) ([#898](#898))
- Regenerate css_ast/src/values from csswg drafts (#899) ([#899](#899))
- css_ast: Remove StringOrUrl type (#909) ([#909](#909))

### Css_lexer
- css_lexer: Introduce UnicodeRange token kind. (#891) ([#891](#891))
- css_lexer: Add "Bad" tokens. (#892) ([#892](#892))
- css_lexer: Re-encode escapes in strings if they're invalid for unescaping (#894) ([#894](#894))
- css_lexer: Re-encode escapes in idents if they're invalid for unescaping (#896) ([#896](#896))
- css_lexer: Rewrite to use Bytes, memchr (#907) ([#907](#907))

### Css_parse
- css_parse: Add BumpBox type and blanket trait impls for Box types (#888) ([#888](#888))
- css_parse: flush trailing semicolons in CursorCompactWriteSink on drop (#908) ([#908](#908))

### Csskit
- chore(deps): update dependencies (patch) (#882) ([#882](#882))

### Csskit_transform
- csskit_transform: introduce css-minify-tests (#886) ([#886](#886))
- csskit_transform: snapshot css-minify-tests failures instead of asserting count (#893) ([#893](#893))
- csskit_transform: reduce Urls to Strings where possible (#910) ([#910](#910))

### Csskit_vscode
- chore(deps): update dependencies (minor) (#884) ([#884](#884))
- chore(deps): update dependencies to v1.49.0 (minor) (#901) ([#901](#901))
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.

1 participant