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: append pending inline text only after unblocked #9

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

1000hz
Copy link
Contributor

@1000hz 1000hz commented Aug 21, 2024

Description

This PR fixes an issue where an inline host node would remain empty if it was the last node in the tree and a blocking node was encountered.

Motivation and Context

Previously, the final attempt to append inline text would happen immediately once the writable stream is closed. However, there can potentially be more pending inline text added to the buffer if the writer is currently blocked waiting on an external resource. This text will never be written.

Instead, we should defer the final write until after we've become unblocked.

Checklist:

  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes

The current architecture of the test fixtures makes it difficult to reproduce the existing issue in a test case because the writer is only closed after all fixture steps are executed.

…ately during close if blocked

This fixes an issue where an inline host node
would remain empty if it was the last node in
the tree and a blocking node was encountered.
Copy link

linux-foundation-easycla bot commented Aug 21, 2024

CLA Signed


The committers listed above are authorized under a signed CLA.

@DylanPiercey DylanPiercey merged commit 1aa87fb into marko-js:main Nov 26, 2024
3 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