Skip to content

Commit b209ee7

Browse files
authored
Merge pull request #11 from engineerjoe440/added-example-image-and-description
Added example image and description
2 parents acff8a3 + bf77f5f commit b209ee7

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

61131example.png

21.1 KB
Loading

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ hljsDefineIECST(hljs);
3535
hljs.initHighlightingOnLoad();
3636
```
3737

38-
Mark the code you want to highlight with the curl class:
38+
Mark the code you want to highlight with the iecst class:
3939

4040
```html
4141
<pre><code class="iecst">...</code></pre>
@@ -47,3 +47,26 @@ or use JavaScript to dynamically highlight text:
4747
hljs.registerLanguage('iecst', window.hljsDefineIECST);
4848
var highlighted = hljs.highlightAuto(text, ["iecst"]);
4949
```
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)

0 commit comments

Comments
 (0)