How should I insert a C++ code snippet in a mindmap node?

0 votes
asked Nov 3 in Question / help by SuperSaiyanGod (320 points)
I'm using the PlantUML plugin in IntelliJ IDEA, and tried to use the <code> environment in a node defined by ***:; but since the trailing semicolons will be treated as the end of the node, the file will collapse. Also the indents will be just ignored. So is there any way to get around this? Perhaps by specifying the code language as C++? (I don't how to do that.)

1 Answer

0 votes
answered Nov 20 by The-Lu (36,240 points)

Hello S.,

After some attempts...
A possible workaround is to use sub-diagram (with `{{` and `}}`), title and code, as:

@startmindmap
* r
** a
**:
{{
title
<code>
main()
{
foo();
}
</code>
end title
}}
;
@endmindmap

If that can help,
Regards,
Th.

...