The reason goldmark uses []byte and not []rune #519
Unanswered
emad-elsaid
asked this question in
Q&A
Replies: 1 comment
-
|
I don't have a full answer, but I think it should be possible to work around this by returning the first byte of the character of interest in trigger, and check the following bytes once the parser has been called. Would that work? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that throughout the code Goldmark uses []byte which makes iterating over it can cause some problems with mutibyte characters such as if a parser should have a trigger that's an emoji or an arabic character. in this case it's never triggered because the byte never matches the character.
So maybe I'm missing something or that was an overlook during design?
Beta Was this translation helpful? Give feedback.
All reactions