-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linkify sponsor description #42
base: main
Are you sure you want to change the base?
Conversation
eb7c297
to
5755c55
Compare
|
||
linkify : String -> Html msg | ||
linkify string = | ||
div [] (List.map linkifyWord (String.words string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method currently fails, if the URL isn't terminated with a space. So if it is at the end of a sentence the URL would include the dot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe we should work with RegEx instead? Then we'd be a bit more flexible. Although I like the simplicity of List.map
on String.words
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, maybe we should work with RegEx instead? Then we'd be a bit more flexible. Although I like the simplicity of List.map on String.words.
I had a fist version which just worked with String.words
and then concatenated the text back together. But I then failed to create a Html
object out of it which didn't escape the HTML in the string.
@rnestler do you want to port your fix to the current master (with Elm 0.19)? |
@rnestler bump? |
No description provided.