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 backcompat parsing for geo property #195

Closed
gRegorLove opened this issue Aug 10, 2018 · 0 comments · Fixed by #202
Closed

Fix backcompat parsing for geo property #195

gRegorLove opened this issue Aug 10, 2018 · 0 comments · Fixed by #202
Milestone

Comments

@gRegorLove
Copy link
Member

With this test, when the geo property is backcompat parsed as p-geo h-geo, the parser is incorrectly adding an implied p-name for the h-geo.

Simplified HTML:

<div class="vcard">
  <div class="fn">John Doe</div>
  <div>Location: <abbr class="geo" title="30.267991;-97.739568">Brighton</abbr></div>
</div>

parsed:

"items": [
    {
        "type": [
            "h-card"
        ],
        "properties": {
            "name": [
                "John Doe"
            ],
            "geo": [
                {
                    "type": [
                        "h-geo"
                    ],
                    "properties": {
                        "name": [
                            "30.267991;-97.739568"
                        ]
                    },
                    "value": "30.267991;-97.739568"
                }
            ]
        }
    }
]

expected:

"items": [
    {
        "type": [
            "h-card"
        ],
        "properties": {
            "name": [
                "John Doe"
            ],
            "geo": [
                {
                    "type": [
                        "h-geo"
                    ],
                    "properties": {},
                    "value": "30.267991;-97.739568"
                }
            ]
        }
    }
]

I think this switch needs a case for geo.

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 a pull request may close this issue.

1 participant