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

Syntax Highlighter Block: Cannot format MATLAB code. #38788

Closed
vinnykaur opened this issue Jan 11, 2020 · 7 comments · Fixed by Automattic/syntaxhighlighter#188
Closed

Syntax Highlighter Block: Cannot format MATLAB code. #38788

vinnykaur opened this issue Jan 11, 2020 · 7 comments · Fixed by Automattic/syntaxhighlighter#188
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Goal] Gutenberg Working towards full integration with Gutenberg [Pri] Low Address when resources are available. Triaged To be used when issues have been triaged. [Type] Bug

Comments

@vinnykaur
Copy link

Steps to reproduce

  • Go to My Sites > Posts > Add new post
  • Select Syntax highlighter block
  • Add a code and choose MATLAB as the language from block settings.

What I expected

  • It should ideally view the formatted code on publishing.

What happened instead

  • The code isn't formatted.
  • The code falls out of the margin.
  • No line breaks between two syntax highlighter blocks.
  • Tested this with Maywood/Twenty-Twenty/The Writer. I could see the issue on all the themes.

#user-report Ticket #2622184 in zd with the user having this issue (Using Maywood theme)

Browser / OS version

Google Chrome Version 78.0.3904.97 (Official Build) (64-bit)

Screenshots

Unformatted code:
Screen Shot 2020-01-11 at 15 39 57

Screen Shot 2020-01-11 at 15 42 04

Screen Shot 2020-01-11 at 15 45 06

@vinnykaur vinnykaur added [Type] Bug [Goal] Gutenberg Working towards full integration with Gutenberg labels Jan 11, 2020
@kriskarkoski
Copy link
Contributor

I believe we use a version of SyntaxHighlighter Evolved on WordPress.com. I tested the user's MATLAB example on Jurassic Ninja using that plugin and it caused an error:

Screen Shot 2020-03-12 at 10 22 06 PM

On my test site the code wasn't formatted, but also didn't cause layout issues as in the screenshots above.

@mkaz I also tested your plugin and it worked as expected. Pinging you in case you have bandwidth to take a look at this issue given your expertise :)

@mkaz
Copy link
Contributor

mkaz commented Mar 13, 2020

The Evergreen team (formerly Guardians) is managing the SyntaxHighlighter plugin so they might be able to help with the errors.

With the regards to my plugin, I saw this raised in another channel and provided some info, but not sure the priority of switching out, or if anyone is working on it. @simison might know?

@simison
Copy link
Member

simison commented Mar 13, 2020

[...] but not sure the priority of switching out, or if anyone is working on it.

No plans as far as I know.

WordPress.com blocks are maintained by Grow focus tho, @lessbloat @obenland @creativecoder

@supernovia
Copy link
Contributor

Noting another complaint here:
https://en.forums.wordpress.com/topic/bug-matlab-in-syntaxhighlighter-code-block/

This person is switching to C to see the code displayed properly.

@cathymcbride cathymcbride added Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Pri] Low Address when resources are available. labels Sep 25, 2020
@synora
Copy link
Contributor

synora commented Jan 27, 2021

Noting that I'm still able to replicate this issue. I've tested with Twenty-Twenty and Twenty-Twenty One themes.

@synora synora added the Triaged To be used when issues have been triaged. label Jan 27, 2021
@obenland
Copy link
Member

The Evergreen team (formerly Guardians) is managing the SyntaxHighlighter plugin so they might be able to help with the errors.

@Automattic/evergreen Is this something you've come across before or could possibly help out with?

@jom
Copy link
Member

jom commented Jan 28, 2021

I put up a fix for it in Automattic/syntaxhighlighter#188. I think the WPCOM version has diverged a bit, but this is an easy change to make so once approved I'll fix it on WPCOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Editor blocks, aka Gutenberg blocks, plugins, and extensions [Goal] Gutenberg Working towards full integration with Gutenberg [Pri] Low Address when resources are available. Triaged To be used when issues have been triaged. [Type] Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants