WordPress.org

Making WordPress.org

Opened 7 years ago

Last modified 10 months ago

#815 accepted enhancement

Forums to Support Syntax Highlighting

Reported by: nphaskins Owned by: tellyworth
Milestone: Q1 Priority: low
Component: Support Forums Keywords:
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)

Screen Shot 2020-01-31 at 3.28.08 PM.png (125.7 KB) - added by valentinbora 23 months ago.
Syntax highlighting proof of concept

Download all attachments as: .zip

Change History (10)

#1 @BrashRebel
7 years ago

  • Cc kyle@… added

This ticket was mentioned in Slack in #forums by clorith. View the logs.


4 years ago

#3 @tellyworth
3 years ago

  • Milestone set to Q1

#4 @tellyworth
3 years ago

  • Owner set to tellyworth
  • Status changed from new to accepted

@valentinbora
23 months ago

Syntax highlighting proof of concept

This ticket was mentioned in Slack in #forums by clorith. View the logs.


22 months ago

#6 @dd32
16 months ago

  • Milestone changed from Q1 to 2020 Q1

Milestone renamed

#7 @dd32
16 months ago

  • Milestone changed from 2020 Q1 to Q1

Milestone renamed

This ticket was mentioned in Slack in #forums by vladytimy. View the logs.


10 months ago

#9 @vladytimy
10 months 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.

Note: See TracTickets for help on using tickets.