Specifying line numbers for selection is flaky and hard to maintain: you have to update all the numbers with every edit to the original source file.
A more robust approach is to use markers, typically injected into source code as comments. For example:
file.py:
# first_marker
def hello():
print("hi!")
# second_marker
Obsidian code block:
```embed-python
PATH: "file.py"
MARKERS: first_marker,second_marker
This should embed the contents between first_marker and second_marker:
def hello():
print("hi!")
Specifying line numbers for selection is flaky and hard to maintain: you have to update all the numbers with every edit to the original source file.
A more robust approach is to use markers, typically injected into source code as comments. For example:
file.py:Obsidian code block:
This should embed the contents between
first_markerandsecond_marker: