You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/remark/plugins/remark-run-javascript-examples/README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,26 @@ function done( error ) {
34
34
35
35
<sectionclass="notes">
36
36
37
+
## Notes
38
+
39
+
- When processing a Markdown abstract syntax tree (AST), the plugin scans the tree for `section` elements with the class `examples`. For example,
40
+
41
+
<!-- lint disable code-block-style -->
42
+
43
+
<section class="examples">
44
+
45
+
## Examples
46
+
47
+
```javascript
48
+
console.log( 'HELLO WORLD' );
49
+
```
50
+
51
+
</section>
52
+
53
+
<!-- /.examples -->
54
+
55
+
Upon finding an examples section, the plugin scans for JavaScript fenced code blocks. For each JavaScript code block, the plugin extracts example code and runs that code in a separate child process.
0 commit comments