Markdown widget should allow any link schemas

Currently, the markdown widget only allows link schemas http and https (iced/widget/src/markdown.rs at master · iced-rs/iced · GitHub).

I do not see the reason to restrict the schema and I would leave more control to the user code rather than restrict it this way in the library. For example, schema file can be very useful in desktop applications.

1 Like

… or for example a steam connect link ( e.g. steam://connect/<server_ip>:<server_port> ).

Actually I think it should allow any text (as a relative path, which shouldn’t contain any schema), and leave to the developer to decide how to handle the link. No need to do that validation in the render IMO.

I made a change in a local fork removing the url dependency and replacing it by type Url = String;, removed the url parsing code and works just fine.

Edit: Since it is a fairly small change, here’s the PR.