필터 지우기
필터 지우기

Why is my code in Matlab Answers not colorful?

조회 수: 7 (최근 30일)
Ran Yang
Ran Yang 2023년 4월 13일
답변: Kayln 2024년 2월 23일
I started using Matlab Answers a few days ago and this is probably a dumb question, but it's starting to bother me.
If I write a code block, whether in a question, comment, or answer, the colors show up normally in the Editor:
But when I actually make the post, all of the colors go away:
I see other people posting their blocks of code with the usual colors. What am I doing wrong?
  댓글 수: 10
Ran Yang
Ran Yang 2023년 4월 13일
I've tested on 3 different browsers (Chrome with Dark Reader enabled/disabled, Firefox with no add-ons, Edge with no add-ons) as well as a second computer. I'm assuming you're all seeing it too (where Stephen23 and I can post the exact same code but his is highlighted and mine is not) so at this point, I'm fairly certain it's a forum-specific issue.
I sent an email to MW Support, hope they can address it.
Walter Roberson
Walter Roberson 2023년 4월 13일
Even stranger: when I use my editor powers to edit your "one last try" post, the preview shows up color coded!
The code will not, if I recall, show up color coded in the case that the Answers editor thinks you are using Mobile. But in that case, you get a quite different editor, with a tab named Draft and a tab named Preview, rather than having the tool ribbon with "TEXT", "CODE", "INSERT", "RUN", "HELP" sections.
And if it thinks you are using mobile, then the editor you get then does not have explicit text blocks: you just have to know that to get a code block you need to leave a (completely) empty line and then have the first line after that indented by at least one space.

댓글을 달려면 로그인하십시오.

채택된 답변

Ran Yang
Ran Yang 2023년 4월 13일
I think I might have figured it out? After trying to turn more random things off and on again, I tried disabling my VPN and for some reason... that worked?
Not sure how that even happens, but I guess it's all good now (minus the lack of VPN part)

추가 답변 (2개)

Cris LaPierre
Cris LaPierre 2023년 4월 13일
Not sure who you sent the email to, but please report this here: https://www.mathworks.com/support/contact_us.html
  댓글 수: 1
Ran Yang
Ran Yang 2023년 4월 13일
편집: Ran Yang 2023년 4월 13일
I went there first, filled out the report a bug form, and got an error message that told me to send the request directly to support@mathworks.com. Should I try to fill out the form again?
Edit: Nvm, got an email response and working with support as I type this.
---- Troubleshooting area with MW Support ----
fprintf('vpn off\n')
for empty
% do nothing
end
fprintf('insert matlab code example\n')
for empty
% do nothing
end

댓글을 달려면 로그인하십시오.


Kayln
Kayln 2024년 2월 23일
I had the same issue. I ended up having to uninstall one of my debuggers and it seemed to come back.

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by