Add a Remark Plugin that enables linking code blocks to real code files. Code blocks should include which example mod is to be linked, the relative path to example mod code, and (optionally) a label of the span which is included. In the source files, comments should specify the specific ranges for each labels. Leading whitespace that all lines of an embed have in common should be trimmed.
https://github.com/kevin940726/remark-code-import might work as a baseline, but the span is defined in the code block, not in the source code, which is not ideal.
Why should this be added to the wiki?
Currently one of the main issues with the wiki is that it is difficult to see to which file a code block actually belongs. This would fix the issue (See #67 ). Additionally, it would enable us to write example mods without the danger of source code and markdown getting out of sync.
What would you like the wiki to cover?
Add a Remark Plugin that enables linking code blocks to real code files. Code blocks should include which example mod is to be linked, the relative path to example mod code, and (optionally) a label of the span which is included. In the source files, comments should specify the specific ranges for each labels. Leading whitespace that all lines of an embed have in common should be trimmed. https://github.com/kevin940726/remark-code-import might work as a baseline, but the span is defined in the code block, not in the source code, which is not ideal.
Why should this be added to the wiki?
Currently one of the main issues with the wiki is that it is difficult to see to which file a code block actually belongs. This would fix the issue (See #67 ). Additionally, it would enable us to write example mods without the danger of source code and markdown getting out of sync.
Example
For example, for this code block:
Would result in the following markdown:
With the content of ExampleMod.java being: