srid/neuron

Feature Request: File inlining (in Markdown)

ratsclub opened this issue · 3 comments

As noted on Neuron's Matrix room, it'd be nice to have File Inlining as a feature.

Considering the following file called main.py:

# ANCHOR: main
def main():
    print("Hello, World!")
# END_ANCHOR: main

One should be able to inline it inside other markdown files with the following syntax:

# Include the whole file
![](main.py)

# Line range
![](main.py:2:3)

# Everything between anchors
![](main.py:main)

Note this is just an abstract. Syntax and feature ideas are welcome

srid commented

See also #620 by @RoyiAvital

How does Obsidian behave when embedding source code using this syntax? Does it support extracting a subset based on line rage? EDIT: Doesn't look like it even supports including of non-media / non-Markdown files.

srid commented

Adding general embedding ![[..]] in srid/emanote#24

srid commented

Closing per https://neuron.zettel.page/next ... to further discuss this idea, post in Emanote repo. Specifically continue discussion in srid/emanote#24