1====== Webcode - Not displaying code block  ======
2
3===== About =====
4This is possible to cache code block with this syntax:
5
6<file>
7<code [display="none"]>
8// cached
9</code>
10</file>
11The ''display="none"'' syntax comes from the [[https://www.dokuwiki.org/syntax_highlighting|advanced syntax]]
12
13===== Example =====
14
15==== Note ====
16
17  * The cached code blocked in the example below is written with this syntax.
18<file javascript>
19<code javascript [display="none"]>
20console.log("A log from the cached block");
21</code>
22</file>
23
24
25==== The example ====
26
27
28<webcode name="Default" frameborder=0 renderingMode=story >
29  * We should not see the cached code block (Only the bullet point of the list)
30
31<code javascript [display="none"]>
32console.log("A log from the cached block.");
33</code>
34  * We should see the code block below
35<code javascript>
36console.log("A log from the visible block");
37</code>
38  * In the result, we should see two log line (one from the cached block and one from the visible one)
39</webcode>
40