-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
emojis in titles not working correctly #1009
Comments
@anikethsaha /(?:^|\s):([\w-]+)=?([\w-]+)?/g I cheked the history of the function. THEN, A new feature feat: add heading config id called the function for the titles to get configurations. At the same time, there is the bug that the regex worked correctly to the title. NEXT, the regex was updated once to fix one case Fix getAndRemoveConfig regex likes Although, I tried to rewrite the regex ( a little bit hard for me ) or just keep the original title to be rendered to fix the bug, I thought the function should be separate for different places, or in another way. beside that, the emojis have configuration noEmoji also. |
@Koooooo-7 thanks a lot for detailed investigation |
@anikethsaha |
Can you mention some ? |
@anikethsaha
All of them r not working correctly. If possible, I think we need rewrite the feature feat: add heading config id in another way that we dont through the |
I don't think trying to document this behaviour is going to work since it seems pretty unpredictable (look closely at the examples above). Here's an idea - for the weird code syntax cases that #708 was trying to fix, require users to put them within a code backticks to avoid any conflicting treatment from config or emojis, for example:
|
then what are you suggesting ? cause if you are thinking to consider other char, then I am pretty sure it will break other things or will give issues like #708 for other langs |
It will render as code block like this
|
this case if it will render as u posted above, I think it is okay at now, but Idk how to document this clearly . I think we may use |
I think it wont render as I commented. it will be different. I need to look there.
lets have triple Anything else you think will fit here better ? @trusktr , what do you think ? |
I think the key is we can set the |
+1 for this as well.
Lets have a PoC for this. |
A better regex to support the current would be better if possible as it has fewer consequences of the change. Feel free to submit the better regex as well if possible |
Bug Report
Processing the emojis in titles isn't working correctly. Sometimes just turning it into a single ":" character. Seems to work correctly if no leading space before the emoji code.
Steps to reproduce
Insert this content in a page
What is current behaviour
What is the expected behaviour
All emojis should appear
Other relevant information
Bug does still occur when all/other plugins are disabled?
Your OS: mac
Node.js version: 11.15
npm/yarn version: 6.7
Browser version: chrome latest
Docsify version: cli is 4.4, using latest from cdn
Docsify plugins: all disabled
The text was updated successfully, but these errors were encountered: