Include file-content as part of markdown.
It would be great if we could include certain lines from another file to be showed inside a mardown file.
For example something like:
{5:12}(code/example.java)
Would result in including the specified java file, lines 5 to 12
05.
06. public static void main(String[] args) {
07.
08. system.out.println("Hello World!");
09.
10.
11.
12. }
+1
+1
+1
+1
+1
+1
+1
+1
+1
For what it's worth I was giving this some consideration the other day and I think the only realistic way to implement such a thing is probably to have the resources be fetched as CLIENT SIDE includes.
The server would not pre-parse these 'extensions'. A page could opt into resolving them if it was in their best interest as a 'feature' with a small client side javascript.
For security this could be limited either strictly to same origins or with CORS/CSP outside of the libraries control.
+1
+1
I'd love any feedback on my proposal for a client-side extensions lib that would provide this
I have a simple use case. I have a file version.txt which contains the current version of my project. I want to be able to pull that version number into my markdown eg. so I can reference a particular version of my code in GitHub by its label in my README.md.
Thanks for your feedback - every bit will hopefully push this agenda along a bit!
+1 I would love to pull in my .env.example file
+1
+1
+1
+1