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

other URL schemes #72

Open
Johann150 opened this issue Aug 15, 2021 · 4 comments · Fixed by #73
Open

other URL schemes #72

Johann150 opened this issue Aug 15, 2021 · 4 comments · Fixed by #73
Labels

Comments

@Johann150
Copy link
Contributor

💡 Summary

Only http or https URL schemes are recognized. According to the WHATWG specification, many more schemes are possible (mailto, irc, gemini, ...): [a-zA-Z] [-a-zA-Z0-9+.]* ":"

👉 current specification about URL scheme (⎇日本語)

Understanding all possible URLs in normal text could lead to too many links. My idea would be to understand other URLs only in altUrlFormat and linkUrl (but not in urlFormat).

🙂 Expected Behavior

oops:url
<gemini://example.com>
[send email](mailto:[email protected]?subject=test)

[
  {
    "type": "text",
    "props": {
      "text": "oops:url"
    }
  },
  {
    "type": "url",
    "props": {
      "url": "gemini://example.com",
      "brackets": true
    }
  },
  {
    "type": "link",
    "props": {
      "silent": false,
      "url": "mailto:[email protected]?subject=test"
    },
    "children": [
      {
        "type": "text",
        "props": { "text": "send mail" }
      }
    ]
  }
]
@syuilo
Copy link
Member

syuilo commented Aug 15, 2021

LGTM

@syuilo syuilo added the enhancement New feature or request label Aug 15, 2021
@syuilo syuilo reopened this Aug 24, 2021
@syuilo
Copy link
Member

syuilo commented Aug 24, 2021

see: #73 (comment)

@Johann150
Copy link
Contributor Author

For a list of URL schemes, maybe we could use https://www.npmjs.com/package/schemes but it does not contain any information about the "security" of a URL scheme.

@Neustradamus
Copy link

To follow

@marihachi marihachi added Feature and removed enhancement New feature or request labels Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants