NEW Forum Feature - Syntax Highlighting

#1
I am proud to announce this new forum feature from our web development team as requested by some of our community members!

Syntax Highlighting
The feature currently supports syntax highlighting for C++, C#, HTML/XML and LUA.

Using the new feature
Notice two new available options in the Post Topic pages.
fig1_new_options_highlighted.png
fig1_new_options_highlighted.png (18.67 KiB) Viewed 2501 times


Clicking "Syntax Highlight" gives more information.
The green column on the right is the text to specify the code language.
fig2_specific_tags_highlighted.png
fig2_specific_tags_highlighted.png (12.3 KiB) Viewed 2501 times

Usage examples
C++

Code: Select all

[syntax=cpp]#include <iostream> // Some comment int main() { std::cout << "Hello!"; }[/syntax]

Code: Select all

#include <iostream>
// Some comment
int main()
{
std::cout << "Hello!";
}
C#

Code: Select all

[syntax=cs]using System; class Solution { // Some Comment static void Main(String[] args) { Console.WriteLine("Hello!"); } } [/syntax]

Code: Select all

using System;
class Solution
{
// Some Comment
static void Main(String[] args)
{
Console.WriteLine("Hello!");
}
}
HTML/XML

Code: Select all

[syntax=xml]<!-- Comment --> <HTML> <HEAD> </HEAD> <BODY bgcolor="#323232" text="#EEEEEE"> Hello! </BODY> </HTML> [/syntax]

Code: Select all

<!-- Comment -->
<HTML>
<HEAD>
</HEAD>
<BODY bgcolor="#323232" text="#EEEEEE">
Hello!
</BODY>
</HTML>
LUA

Code: Select all

[syntax=lua]-- Comment print("Hello!") [/syntax]

Code: Select all

-- Comment
print("Hello!")
I hope this gives a good demonstration of how to use this new feature in your posts and gives some nice color to your code examples and snippets. I am looking forward to seeing your colorful code, and as always feedback is welcome and appreciated.
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: NEW Forum Feature - Syntax Highlighting

#4
Thanks for the suggestion. It would be more appropriate to post your suggestion into the Website category.

For now you can get a similar result by using the advanced search. By clicking the magnifying glass (search icon) at the top and clicking the subsequent search icon that appears you are taken to the advanced search form. Here you can specify to:
  • Search by author
  • Search within only the first post
  • Display results as topics
This should give you a similar effect and you can simply count the number of results.
Uniflare
CRYENGINE Community Coordinator
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Who is online

Users browsing this forum: No registered users and 4 guests