-
-
Notifications
You must be signed in to change notification settings - Fork 227
Open
Description
Currently the code injection allows you to specify lines of code from a file:
<!-- AUTO-GENERATED-CONTENT:START (CODE:src=./relative/path/to/code.js&lines=22-44) -->
This content will be dynamically replaced with code from the file lines 22 through 44
<!-- AUTO-GENERATED-CONTENT:END -->This can be dificult to maintain as line numbers are subject to change with API changes. An easier way to do this would be to select between specified comment blocks. Here's a simple example:
<!-- AUTO-GENERATED-CONTENT:START (CODE:src=./relative/path/to/code.js&block=BLOCK1) -->
This content will be dynamically replaced with code (from the file) found between comments containing "BLOCK1".
<!-- AUTO-GENERATED-CONTENT:END -->code.js :
// ...
// <BLOCK1>
console.log("This will get selected");
// </BLOCK1>Happy to help out with a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels