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

The output for nested italic and bold is incorrect. #113

Open
0smr opened this issue Apr 5, 2023 · 5 comments
Open

The output for nested italic and bold is incorrect. #113

0smr opened this issue Apr 5, 2023 · 5 comments

Comments

@0smr
Copy link

0smr commented Apr 5, 2023

Hi, it seems the output for ***text*** or ___text___ is incorrect. The correct output should be either <em><strong>text</strong></em> or <strong><em>text</em></strong>. Currently, it is <strong><em>text<strong><em></em></strong></em></strong>.

@0smr
Copy link
Author

0smr commented Aug 24, 2023

@NguyenHoangHieu22GIT2 Actually, it's impressive considering its tiny source size, but as it consists solely of a single regular expression, fixing any issues is almost impossible.

@AlexanderFarkas
Copy link

AlexanderFarkas commented Jul 29, 2024

@0smr AFAIK any lexer can be rewritten into regular expression, if it operates on a language with regular grammar.
I believe, fixing issues is hard due to parser being embedded into the lexing process - it basically does everything in a single run.

@0smr
Copy link
Author

0smr commented Jul 29, 2024

@AlexanderFarkas I understand that. I just opened the issue so that the maintainer would be aware of it, and any other developer who sees this. However, I didn't wait for any fixes since I was sure that this wouldn't get fixed in the near future.

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

3 participants
@AlexanderFarkas @0smr and others