Opened 10 years ago
Last modified 10 months ago
#815 accepted enhancement
Forums to Support Syntax Highlighting
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Q1 | Priority: | low |
Component: | Support Forums | Keywords: | close |
Cc: |
Description
Quite often we're sharing code snippets to help our users when providing support. I would love to see the support forums support syntax highlighting. In it's current implementation it's not incredibly helpful to the end user.
Here's an example:
https://wordpress.org/support/topic/reorder-posts-in-collection?replies=4
Attachments (1)
Change History (11)
This ticket was mentioned in Slack in #forums by clorith. View the logs.
7 years ago
This ticket was mentioned in Slack in #forums by clorith. View the logs.
5 years ago
This ticket was mentioned in Slack in #forums by vladytimy. View the logs.
4 years ago
#9
@
4 years ago
Some key points from this chat
- nowadays one would need to support different types of code and still allow to easily copy and use. Might need various toggle controls and stuff and a nontechnical user would not feel comfortable to choose from "CSS", "HTML", "PHP" if they don't know what that means
- typically, people will paste just a snippet, which may both start and end with some garbage. Syntax highlighting may go terribly wrong in pairing parenthesis, for instance.
- not even Trac doesn't support Syntax Highlighting, just numbered lines, which makes it impossible to copy code from the view.
Maybe there is a perfect solution that cover automatically language detection and incomplete code errors that we are not aware of.
Syntax highlighting proof of concept