How to add a custom code block macro?

Brayden July 25, 2017

Verilog is one of the widely used language for hardware design. Currently, Code Block Macro doesn't support verilog for syntax highliting. Is there any plan for support this lanugages? 

 

I think many companies uses verilog or VHDL for hardware design. And there are a lot of syntax hightling code for thouse languages. I think the job to support these languages is a quite simple for developers of code block macro. 

 

1 answer

1 vote
Stephen Deutsch
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2017

다행이 답이 있습니다!

You're in luck, because there is a solution. The Code Block macro uses syntaxhighlighter brushes in the background, and these can be installed manually (if you are using the server version).

Here is a brush for Verilog:

https://plugins.trac.wordpress.org/export/1702796/syntaxhighlighter-evolved-vhdl-brush/trunk/shBrushVerilog.js

and here is a brush for VHDL:

https://plugins.trac.wordpress.org/export/1702797/syntaxhighlighter-evolved-vhdl-brush/trunk/shBrushVhdl.js

Save those files to your computer, then go to the General Settings (you must be Confluence Admin)

  1. Click "Configure Code Macro"
  2. Click "Add a new Language"
  3. Browse and choose the brush file you saved
  4. Name the brush
  5. Click "Add" (repeat steps 2-5 for each brush)
  6. Done! Now the syntax highlighting should be visible in the code block macro.

image.png

Are you using the Cloud version of Confluence? In that case, it's even easier. Just install the free Better Code for Confluence add-on, and that has VHDL and Verilog syntax highlighting built-in.

도움이 됐다면 "답했다" 표시해주세요!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events