简体   繁体   中英

C# Syntax Highlighting for Confluence

Does anyone know of any C# syntax highlighter plugins for Confluence? Using the default Java highlighter works, but it misses things like string in C# and String in Java, with the latter being highlighted and the former plain black text.

There is a so called newcode macro that allows a lot of different languages. See https://studio.plugins.atlassian.com/wiki/display/NCODE/Confluence+New+Code+Macro for the macro itself.

To use the macro, just enclose your code into

{newcode:csharp}...{newcode}

With newer versions of this macro (or newer versions of Confluence itself), you are free to use the macro name newcode or code . Since version 4.x of Confluence, the visual editor supports the finding of macros much better, so just start typing: {code which results then in

在此输入图像描述

In the then opening macro editor, you may select directly the language (and some other parameters):

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM