Skip to content

microformat mentions can have an implicit url property#12189

Merged
Gargron merged 1 commit intomasterfrom
nightpool-patch-1
Oct 24, 2019
Merged

microformat mentions can have an implicit url property#12189
Gargron merged 1 commit intomasterfrom
nightpool-patch-1

Conversation

@nightpool
Copy link
Copy Markdown
Member

See the first example here: http://microformats.org/wiki/microformats2#hyperlinked_person

Simple hyperlinked person reference
<a class="h-card" href="http://benward.me">Ben Ward</a>

Parsed JSON:

{
  "items": [{ 
    "type": ["h-card"],
    "properties": {
      "name": ["Ben Ward"],
      "url": ["http://benward.me"]
   }
  }]
}

see http://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties for a more detailed list of implicit property parsing rules.

We might also want to change the HTML mastodon generates at some point, since having an extra span element feels awkward to me.

@Gargron
Copy link
Copy Markdown
Member

Gargron commented Oct 20, 2019

There is an extra span for a better underline effect on hover that does not include the at sign, we won’t remove that

Copy link
Copy Markdown
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. But I think we could also skip URLs for hashtags and mentions listed in the ActivityStreams tag attribute.

@Gargron Gargron merged commit 9762fe3 into master Oct 24, 2019
@Gargron Gargron deleted the nightpool-patch-1 branch October 24, 2019 20:55
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.

4 participants