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

Markdown filter indexes UTF-8 strings with countUntil result #205

Closed
MartinNowak opened this issue Mar 30, 2013 · 1 comment
Closed

Markdown filter indexes UTF-8 strings with countUntil result #205

MartinNowak opened this issue Mar 30, 2013 · 1 comment

Comments

@MartinNowak
Copy link
Contributor

For example filterMarkdown("[ö](/o)") is not recognized as link.

The problem is, that countUntil returns the number of code points.
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/textfilter/markdown.d#L796

@s-ludwig
Copy link
Member

Thanks for reminding me that this needed to be fixed. At the time when std.algorithm.indexOf was deprecated, I just blindly followed the suggestion to use countUntil and didn't realize the semantic issues (and I think countUntil was acually returning a byte index until recently...)

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

No branches or pull requests

2 participants