-
Notifications
You must be signed in to change notification settings - Fork 27
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
Placing an InlineBox at the beginning of non-first line #138
Comments
I think this is just a bug. At a conference this week, but I will take a look when I get a chance. |
I have been trying to investigate the problem. It seems that if I put an inlinebox at the beginning of the second line then it creates 3 items: [run, inlinebox, run]. When it processes items for line breaks then it triggers a mandatory break when processing the 3rd item (2nd run) so it also includes the inlinebox in the first line. Do you have any idea if this is a line break problem? I would expect that the line break should occur during processing of the first run, but I am not so sure how the code works. |
When a inline box is placed at the beginning of the non-first line then line breaking is wrong. Lets have the following text: ``` Line1\nLine2 | \- Inlinebox here ``` It produces the following items in layout: [run, inlinebox, run] But the line breaking occurs when the second run is processed. So inlinebox ends on the previous line. This PR fixes it by checking that current cluster_idx is mandatory break and ends line before processing inline boxes
My goal is to place an inline box at the beginning of a non-first line. When I place it on an index of "\n" character then it will be placed at the end of the previous line. When I place it to +1 position, then it will be placed after first character.
Examples
Box at index 7
Box at index 8
Question: How to place an inline box at the beginning of the second line?
Images was generated by the following code:
The text was updated successfully, but these errors were encountered: