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

Weirdness with categories in mf2 output #141

Closed
sknebel opened this issue Mar 14, 2018 · 1 comment
Closed

Weirdness with categories in mf2 output #141

sknebel opened this issue Mar 14, 2018 · 1 comment

Comments

@sknebel
Copy link
Contributor

sknebel commented Mar 14, 2018

https://granary.io/url?input=html&output=mf2-json&url=https%3A%2F%2Faaronparecki.com%2F2018%2F03%2F14%2F3%2F

turns html with mf2 like

<li class="h-entry"><a href="/tag/spotify" class="p-category">spotify</a>
</li>

into

      "type": [
        "h-entry"
      ], 
      "properties": {
        "category": [
          {
            "type": [
              "u-category"
            ], 
            "properties": {
              "name": [
                "spotify"
              ]
            }
          }
        ], 

which looks like it's trying to build some kind of nested object for the category?

@snarfed
Copy link
Owner

snarfed commented Mar 15, 2018

interesting! yeah that should probably be a plain string and not a nested object, like how http://pin13.net/mf2/?url=https%3A%2F%2Faaronparecki.com%2F2018%2F03%2F14%2F3%2F does it.

given the prevalence of mf2 parsers, html -> mf2 json is a rare use case for granary, so I'm not surprised it has warts like this... but still, easily fixable. thanks for filing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants