KevinBatdorf / code-block-pro

A Gutenberg code block with syntax highlighting powered by VS Code
https://code-block-pro.com
132 stars 10 forks source link

code direction issue in 1.26.5 update #339

Closed amirhoseinsadeghi closed 1 month ago

amirhoseinsadeghi commented 1 month ago

My site is in Farsi language with right to left direction. In all previous versions of the plugin, the codes in the front-end and back-end were correctly directed from left to right. In the latest version of the plugin (1.26.5), when I updated the plugin, all the codes in my site have found right to left direction. https://i.postimg.cc/JnvVm20H/image.png

KevinBatdorf commented 1 month ago

Did this only happen when you went back to edit the content? Or did it suddenly happen to all your code blocks?

amirhoseinsadeghi commented 1 month ago

backend (edit post in Gutenberg) 👇 https://i.postimg.cc/mgpG8k4S/image.png

front-end (Display on the front of the site) 👇 https://i.postimg.cc/FHRMdvSk/image.png

As soon as I updated the plugin and referred to some posts on the front of the site, I saw that, unlike in the past, unfortunately, all the codes are displayed in a right-to-left direction. While in all the previous versions of the plugin, I did not have this problem and all the codes were correctly displayed from left to right.

As you can see in the first screenshot, this problem does not exist when editing the post in Gutenberg and the codes are left to right, but in the frontend they are right to left.

KevinBatdorf commented 1 month ago

I reproduced it. Looks like from an update to tailwindcss forced the rtl switch. Give me about an hour to make a release. Thank you for reporting it!

KevinBatdorf commented 1 month ago

It actually was an issue with an RTL webpack plugin WordPress added recently. Will release a fix in about 20min