Skip to content

Commit

Permalink
fix: construction of person href with mailto (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
pferruggiaro authored Mar 13, 2023
1 parent 33c5e51 commit b55d293
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hast/paragraph/person.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("person", () => {
},
],
"properties": {
"mailto": "john@example.com",
"href": "mailto:john@example.com",
},
"tagName": "a",
"type": "element",
Expand All @@ -62,7 +62,7 @@ describe("person", () => {
},
],
"properties": {
"mailto": "john@example.com",
"href": "mailto:john@example.com",
},
"tagName": "a",
"type": "element",
Expand Down
2 changes: 1 addition & 1 deletion src/hast/paragraph/person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const transformPerson = (
wrapStyle(
h(
"a",
{ mailto: person.personProperties.email },
{ href: `mailto:${person.personProperties.email}` },
person.personProperties.name ?? person.personProperties.email
),
person.textStyle
Expand Down

0 comments on commit b55d293

Please sign in to comment.