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
Fix code block syntax highlighting not updating when changing its language #2267
Conversation
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
@Abdulrehman-Jafer editor tests are failing. |
There was a problem hiding this 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.
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
There was a problem hiding this 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>
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>
@Abdulrehman-Jafer you need to add tests for this. |
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
packages/editor/src/extensions/code-block/tests/code-block.test.ts
Outdated
Show resolved
Hide resolved
packages/editor/src/extensions/code-block/tests/code-block.test.ts
Outdated
Show resolved
Hide resolved
packages/editor/src/extensions/code-block/tests/code-block.test.ts
Outdated
Show resolved
Hide resolved
packages/editor/src/extensions/code-block/tests/code-block.test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Abdulrehman-Jafer <abdulrehmanjaferwork01233@gmail.com>
Signed-off-by: Abdullah Atta <thecodrr@protonmail.com>
There was a problem hiding this 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.
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>
Fixes #2222