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

mailto with space after colon parses incorrectly (but is not against spec) #68

Closed
zkamvar opened this issue May 11, 2022 · 1 comment
Closed
Labels
wontfix This will not be worked on

Comments

@zkamvar
Copy link
Member

zkamvar commented May 11, 2022

Spaces for mailto links must be formatted with the escape code %20, including after the colon. This is in accordance with the commonmark spec (CommonMark Spec: Link Destination)

Examples:

In tinkr:

mailto with no space works:

tinkr::yarn$new(textConnection("[link](mailto:zkamvar@example.com)\n"))$body |> xml2::xml_child() |> as.character() |> writeLines()
#> <paragraph>
#>   <link destination="mailto:zkamvar@example.com" title="">
#>     <text xml:space="preserve">link</text>
#>   </link>
#> </paragraph>

mailto with a space converts it to text with an internal mailto link (since the email is automatically converted)

tinkr::yarn$new(textConnection("[link](mailto: zkamvar@example.com)\n"))$body |> xml2::xml_child() |> as.character() |> writeLines()
#> <paragraph>
#>   <text xml:space="preserve">[link](mailto: </text>
#>   <link destination="mailto:zkamvar@example.com" title="">
#>     <text xml:space="preserve">zkamvar@example.com</text>
#>   </link>
#>   <text xml:space="preserve">)</text>
#> </paragraph>

Created on 2022-05-11 by the reprex package (v2.0.1)

@zkamvar zkamvar added the wontfix This will not be worked on label May 11, 2022
@zkamvar
Copy link
Member Author

zkamvar commented May 11, 2022

I am leaving this here just in case anyone else runs into this issue and wants to know the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant