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

feat: Add spoiler, superscript and subscript attached modifiers #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VoreckLukas
Copy link

The change in 582 has been made by my autoformatter doing format on save. I didn't notice it until I made this pr

Copy link
Member

@NTBBloodbath NTBBloodbath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the changes!

Could you please also modify the according tests for the attached modifiers? CI seems to be failing :p

@NTBBloodbath NTBBloodbath added the enhancement New feature or request label Dec 23, 2024
@VoreckLukas
Copy link
Author

Sorry, didn't notice the tests, I made the changes at 1 AM 😅

It will be done

@VoreckLukas
Copy link
Author

I looked into it and found the issue. The failing test is testing this snippet

"this *is* a test",
"hello, *world*!",
"*hello, world!*",
"*hello*, world!
"*/hello/*, world!",
"*hi!* how are you?",
"this *is a test",
"this *is/ a test",
"this *is*/ a test",
"this */is/*/ a test",

Due to an attached modifier being able to span multiple paragraph segments the exclamation marks cause it to parse as a spoiler. I'm going to escape the exclamation marks and see if it fixes the test

@VoreckLukas
Copy link
Author

Seems like it's not only that, it somehow messes up parsing of attached modifiers altogether

@benlubas
Copy link
Contributor

benlubas commented Feb 2, 2025

So the issue here is with the attached modifier parsing that becomes very apparent when these common symbols are added as attached modifiers.

On main, I can replicate the issue that we see on this branch with an example like: *hello/ world_*. This should be bold, but instead it's parsed as just plain text.

I don't think this is at all easy to solve, will probably require a re-write of a lot of the detached modifier parsing code.

@benlubas
Copy link
Contributor

benlubas commented Feb 2, 2025

issue is somewhat related to #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants