Inconstant List Indentation - #616
Open
progmem wants to merge 4 commits into
Open
Conversation
added 3 commits
May 20, 2017 01:29
…ation By observing the data available at work->data, an interesting observation was noted that causes the tracking of indentation to be improperly handled. Specifically, the indentation on Item 3 appears to be handled incorrectly, which causes issues when scanning on the next iteration, from Item 2 downward. To correct this, indentation is first handled as normal, checking up to four characters. We do this by initializing pre to our starting value, 4, then perform the indentation check using pre instead of the fixed value. Since pre is being updated constantly, this allows us to take the current indent and use it to properly crawl the list. An interesting note is that the test for this issue will fail if you add a sixth-level item. This is due to max_nesting and how nesting is tracked on lists. On a linear list, a max_nesting of (1 + 2 + ... + n) is required, with n being the furthest nesting level. By default, max_nesting is 16, and a list 5 deep works, hitting a nesting of 15. However, with 6 levels, we need a max_nesting of 21 or greater.
|
@progmem Can you rebase or resolve the conflict in the branch? |
Author
|
@Stargator Should be good now! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for issue #615