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

Sanitize simplified line breaking #956

Merged
merged 5 commits into from Nov 7, 2019
Merged

Sanitize simplified line breaking #956

merged 5 commits into from Nov 7, 2019

Conversation

Tontyna
Copy link
Contributor

@Tontyna Tontyna commented Oct 3, 2019

The special case that an already broken child must be split again confronts us with two skip stacks: The initial (absolute) and the adjusted (partial) stack. Often the new stack is a relative one and (carefully) adding both stacks is ok. But the following must be observed:

  • The first number of the combined stack has to be the index of the child we broke twice.
  • A child index bigger than the starting index of the initial stack denotes that the new skip stack is an absolute stack. Don't add nothing.

Should fix #953

The special case that an already broken child must be split again confronts
us with two skip stacks: The initial (absolute) and the adjusted (partial)
stack. Often the new stack is a relative one and (carefully) adding both
stacks is ok. But the following must be observed:

- The first number of the combined stack has to be the index of the child
  we broke twice.
- A child index bigger than the starting index of the initial stack denotes
  that the new skip stack is an absolute stack. Don't add nothing.

Should fix Kozea#953
@Tontyna
Copy link
Contributor Author

@Tontyna Tontyna commented Oct 3, 2019

That's what I came up after a lot of dirty debugging -- eventually I gained a grasp of how those recursive skip stacks (skipping back and forth) are meant to work.

What confused me a lot is the mixture of child indices with text positions. And of course there are the two trees of boxes. Skip stack pointing to the original unsplit raw formatted tree, children being copies containing adjusted text fragments. It occurred to me that I wanted them to have a pointer to their origin, or to their parent box...

@Tontyna Tontyna mentioned this pull request Oct 4, 2019
@liZe liZe merged commit dbdc581 into Kozea:master Nov 7, 2019
0 of 2 checks passed
@liZe liZe added this to the 51 milestone Nov 7, 2019
@Tontyna Tontyna deleted the skip_crash branch Nov 7, 2019
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.

3 participants