Opened 9 years ago

Last modified 2 months ago

#815 accepted enhancement

Forums to Support Syntax Highlighting

Reported by: nphaskins's profile nphaskins Owned by: tellyworth's profile tellyworth
Milestone: Q1 Priority: low
Component: Support Forums Keywords: close


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:

Attachments (1)

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

Download all attachments as: .zip

Change History (11)

#1 @BrashRebel
9 years ago

  • Cc kyle@… added

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

6 years ago

#3 @tellyworth
5 years ago

  • Milestone set to Q1

#4 @tellyworth
5 years ago

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

4 years ago

Syntax highlighting proof of concept

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

4 years ago

#6 @dd32
4 years ago

  • Milestone changed from Q1 to 2020 Q1

Milestone renamed

#7 @dd32
4 years ago

  • Milestone changed from 2020 Q1 to Q1

Milestone renamed

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

3 years ago

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

#10 @sebastienserre
2 months ago

  • Keywords close added

Is this ticket always an enhancement?
Nowadays, the forum is powered by block editor, and we can share snippets thanks to the code block.

Note: See TracTickets for help on using tickets.