-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[Bug] Hugo doesn't replace some emoji after a ":" #2246
Comments
i will try to contribute through a pull request but it is a little bit complicated to retrieve go package and use local source of Hugo etc... So for the moment I push my code here : helpers/emoji.go ` package helpers import ( var ( // Emojify "emojifies" the input source.
} func EmojiTranslateFunc(str string) string { func initEmoji() { ` |
Duplicate of #2198 |
Out of curiosity more than anything: ``` BenchmarkEmojiRegxp-4 100000 19064 ns/op 17552 B/op 55 allocs/op BenchmarkEmojiKyokomiFprint-4 20000 86373 ns/op 33960 B/op 117 allocs/op BenchmarkEmojiKyokomiSprint-4 20000 86308 ns/op 38232 B/op 122 allocs/op BenchmarkHugoEmoji-4 500000 5721 ns/op 624 B/op 13 allocs/op ``` There may be ways to get less allocation from the regexp case. See gohugoio#2246
Yes in fact my tescase does not work with the last version before your last commit @bep I see you make speed test ? and corrected issue with an other method ? ok no problem for me ;) Thanks, |
I haven't corrected this with another method. I added your test case to master to make sure that we were on the page. It passed. If you tell me that a test case fixed the issue, that sounds weird. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
With the last master head version Hugo is not able to replace emoji after ":" character.
For example this text does not work:
So I try to replace code used in emoji.go by regexp, in order to work with all text.
The text was updated successfully, but these errors were encountered: