【Posting Guide】Code Syntax Highlighting Format

Device embedded development product technical discussion, including topics such as TuyaOS, SDK, TuyaWind IDE and other developer tools.


Post Reply
愚者千虑必有一得
Posts: 422

Now syntax highlighting is supported for the following code. It aligns with our programming languages.

To avoid conflict with Markdown code, syntax highlighting is currently only supported using the [syntax] tag.

The syntax highlighting format is as follows:

Code: Select all

[syntax=language]
[/syntax]

The table below shows the supported programming languages. If there is a request for adding a new language, please post a reply in the forum.

languagestyle name
C++ cpp
C c
CSS css
Diff diff
HTML, XML xml
Ini ini
JSON json
Java java
JavaScript javascript
Makefile makefile
Markdown markdown
Python python
Shell Session shell
Dust dust
Go go
Lua lua
TypeScript typescript

Below is a highlighted display of C code.

Code: Select all

[syntax=c]
#include <stdio.h>

int main() {
    printf("hellow world!\n");
    return 0;
}
[/syntax]

Code: Select all

#include <stdio.h>

int main() {
printf("hellow world!\n");
return 0;
}
User avatar
EncoreGeek
Posts: 6

Re: 【Posting Guide】Code Syntax Highlighting Format

interesting :D

Post Reply