Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LIST pattern silently eats away anything between nonsibling LIST_ITEM patterns #17

Closed
ishanarora opened this issue May 18, 2018 · 2 comments
Labels
bug Bugs and problems with poyo

Comments

@ishanarora
Copy link
Contributor

LIST pattern silently eats away and anything between nonsibling LIST_ITEM patterns. The only exception is if a comment exists between lists.

For the following input

a:
  - 1
  - 2 # comment between a and b
b:
  - 3
  - 4
c:
  - 5
  - 6
# comment between c and d
d:
  - 7
  - 8

parse_string returns

{
    u'a': [
        1,
        2,
    ],
    u'b': [
        3,
        4,
        5,
        6,
    ],
    u'd': [
        7,
        8,
    ],
}

while the expected output is

{
    u'a': [
        1,
        2,
    ],
    u'b': [
        3,
        4,
    ],
    u'c': [
        5,
        6,
    ],
    u'd': [
        7,
        8,
    ],
}
@ishanarora ishanarora changed the title LIST pattern eats away and silently ignores anything between unrelated LIST_ITEM patterns (unless ) LIST pattern eats away and silently ignores anything between unrelated LIST_ITEM patterns May 18, 2018
@ishanarora ishanarora changed the title LIST pattern eats away and silently ignores anything between unrelated LIST_ITEM patterns LIST pattern silently eats away anything between unrelated LIST_ITEM patterns May 18, 2018
@ishanarora ishanarora changed the title LIST pattern silently eats away anything between unrelated LIST_ITEM patterns LIST pattern silently eats away anything between nonsibling LIST_ITEM patterns May 18, 2018
@ishanarora
Copy link
Contributor Author

Pull request in #18

@hackebrot hackebrot added the bug Bugs and problems with poyo label May 22, 2018
@hackebrot
Copy link
Owner

Hi @ishanarora! 👋

Good catch!

hackebrot added a commit that referenced this issue May 22, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Bugs and problems with poyo
Projects
None yet
Development

No branches or pull requests

2 participants