Include file
If I wish to include a file, it is possible with reStructuredText:
.. include:: app.php
https://docutils.sourceforge.io/docs/ref/rst/directives.html#include
and AsciiDoc:
include::app.php[]
https://asciidoctor.org/docs/asciidoc-syntax-quick-reference#include-files
and Org Mode:
#+INCLUDE: "app.php"
https://orgmode.org/manual/Include-files.html
I think it should be possible to do this with MarkDown.
This is a major feature I would want support for in markdown, but I also believe it should be possible to limit what is included. My initial thought would be that a heading can be referenced if only a section of the file is desired.
Use the image syntax then post-process it by detecting the file extension. You can then call it as “embed” syntax instead of “image” syntax in your Markdown-flavored parser:
