File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ hljsDefineIECST(hljs);
35
35
hljs .initHighlightingOnLoad ();
36
36
```
37
37
38
- Mark the code you want to highlight with the curl class:
38
+ Mark the code you want to highlight with the iecst class:
39
39
40
40
``` html
41
41
<pre ><code class =" iecst" >...</code ></pre >
@@ -47,3 +47,26 @@ or use JavaScript to dynamically highlight text:
47
47
hljs .registerLanguage (' iecst' , window .hljsDefineIECST );
48
48
var highlighted = hljs .highlightAuto (text, [" iecst" ]);
49
49
```
50
+
51
+ ## Example in Markdown-Generated Presentation
52
+ #### (using [ marp] ( https://marp.app/ ) )
53
+
54
+ Craft the IEC 61131 code that is desired and wrap it in a code-block defined with the tripple-backtick (`` ``` `` ) and language as ` iecst ` .
55
+
56
+ ```` markdown
57
+ ```iecst
58
+ VAR
59
+ test : BOOL := TRUE ;
60
+ x : REAL := 5.23;
61
+ lx : LREAL;
62
+ myString : STRING(255) := 'this is a test string';
63
+ END_VAR
64
+ IF test THEN
65
+ lx := REAL_TO_LREAL( COS(x) );
66
+ END_IF
67
+ ```
68
+ ````
69
+
70
+ This will thus render as:
71
+
72
+ ![ IEC 61131-3 Example] ( ./61131example.png )
You can’t perform that action at this time.
0 commit comments