+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_formatter): Best fitting start entry #3310

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

MichaReiser
Copy link
Contributor

I noticed this when investigating how to correctly implement fill.

The problem with only pushing the items of the variant after the StartEntry is that any FitsPredicate that counts the start/end entries won't see the corresponding StartEntry.

Manually pushing the StartEntry onto the stack isn't even necessary because it uses the same args anyway

Why is it important to be fixed. A FitsPredicate may return a PrintError::InvalidDocument if it believes that it has seen an EndEntry without a matching StartEntry even for valid documents.

I noticed this when investigating how to correctly implement `fill`.

The problem with only pushing the items of the variant after the `StartEntry` is that
any `QueuePredicate` that counts the start/end entries won't see the corresponding
`StartEntry`.

Manually pushing the `StartEntry` onto the stack isn't even necessary because it uses the same `args` anyway
@MichaReiser MichaReiser requested a review from ematipico as a code owner October 1, 2022 19:10
@MichaReiser MichaReiser temporarily deployed to netlify-playground October 1, 2022 19:10 Inactive
@MichaReiser MichaReiser added the A-Formatter Area: formatter label Oct 1, 2022
@MichaReiser MichaReiser added this to the 0.10.0 milestone Oct 1, 2022
@netlify
Copy link

netlify bot commented Oct 1, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit c99795f
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/633890b205b7250008c49cec

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

@ematipico ematipico removed this from the 0.10.0 milestone Oct 3, 2022
@ematipico ematipico merged commit b190739 into main Oct 3, 2022
@ematipico ematipico deleted the fix/best-fitting-start branch October 3, 2022 08:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载