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

Fix code block syntax highlighting not updating when changing its language #2267

Merged
merged 15 commits into from Apr 15, 2023

Conversation

Abdulrehman-Jafer
Copy link
Contributor

@Abdulrehman-Jafer Abdulrehman-Jafer commented Apr 4, 2023

Fixes #2222

Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
@thecodrr
Copy link
Contributor

thecodrr commented Apr 4, 2023

@Abdulrehman-Jafer editor tests are failing.

Copy link
Contributor

@thecodrr thecodrr left a comment

Choose a reason for hiding this comment

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

This solution might work but needs fixes. Also please add tests for this.

Abdulrehman-Jafer added 2 commits April 4, 2023 20:23
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Copy link
Contributor

@thecodrr thecodrr left a comment

Choose a reason for hiding this comment

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

Not ready yet.

Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
@Abdulrehman-Jafer
Copy link
Contributor Author

Abdulrehman-Jafer commented Apr 4, 2023

Still returning "No need to register" instead of false which I think is enhancing performance. But if this not feel right to you I can remove it,

Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdulrehman-Jafer <121712508+Abdulrehman-Jafer@users.noreply.github.com>
@thecodrr
Copy link
Contributor

thecodrr commented Apr 5, 2023

@Abdulrehman-Jafer you need to add tests for this.

Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Copy link
Contributor Author

@Abdulrehman-Jafer Abdulrehman-Jafer left a comment

Choose a reason for hiding this comment

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

This will regenerate the other bug that I solved which was language was not applying when user create a new Block and select a language for the first time and user had to select the language for second time to select the language. After debugging I found out that the reason of it was the first time codeblock id was undefined.

@thecodrr
Copy link
Contributor

@Abdulrehman-Jafer

This will regenerate the other bug that I solved which was language was not applying when user create a new Block and select a language for the first time and user had to select the language for second time to select the language. After debugging I found out that the reason of it was the first time codeblock id was undefined.

That's why tests are important.

Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
@thecodrr thecodrr merged commit 0f191eb into streetwriters:master Apr 15, 2023
2 of 3 checks passed
@thecodrr thecodrr changed the title editor: fixed-code-highlights not applying Fix code block syntax highlighting not updating in some cases Apr 15, 2023
@thecodrr thecodrr changed the title Fix code block syntax highlighting not updating in some cases Fix code block syntax highlighting not updating when changing its language Apr 15, 2023
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

Successfully merging this pull request may close these issues.

Syntax highlighting for code blocks?
2 participants