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

Linkify sponsor description #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rnestler
Copy link
Contributor

No description provided.


linkify : String -> Html msg
linkify string =
div [] (List.map linkifyWord (String.words string))
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@dbrgn
Copy link
Contributor

dbrgn commented Apr 15, 2019

@rnestler do you want to port your fix to the current master (with Elm 0.19)?

@dbrgn
Copy link
Contributor

dbrgn commented Oct 10, 2019

@rnestler bump?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants