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 regression on Docx Layout for non float elements #7636

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Nov 20, 2023

fix #7624

I believe this should be how to support non float element, based on what we do for html panelLayout.

Though a question: Should non float layout be tested with layout.float == nil or layout.is_float_reftarget == false ?

It seems we do both.

I added a test for docx floatless panel layout. Oddly we did not had one yet 🤷‍♂️

@cderv cderv requested a review from cscheid November 20, 2023 10:22
@cscheid
Copy link
Collaborator

cscheid commented Nov 20, 2023

Though a question: Should non float layout be tested with layout.float == nil or layout.is_float_reftarget == false ?

These should be equivalent, but I can see that I didn't use either of them consistently. We should clean up the code (the interaction between FloatRefTargets and Layouts is pretty ugly, so I think we should keep the explicit is_float_reftarget variable and just use that).

@cderv
Copy link
Collaborator Author

cderv commented Nov 20, 2023

so I think we should keep the explicit is_float_reftarget variable and just use that).

So I used the right form here ! yeah ! 😉

@cscheid
Copy link
Collaborator

cscheid commented Nov 20, 2023

This looks good, thank you!. If you search globally for .float == nil in our lua files, you'll find that rendering panels outside of floatreftargets is still a very spotty area for us. So, if you're feeling industrious...

@cscheid cscheid merged commit 5673c6f into main Nov 20, 2023
@cscheid cscheid deleted the layout-docx branch November 20, 2023 22:19
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.

Have multiple columns (layout-ncol) work in DOCX, not just HTML and Typst
2 participants