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 395 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 395 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

Who is online

Users browsing this forum: Bing [Bot] and 2 guests