Skip to content

Feature: allow selecting content with markers #20

@danielgafni

Description

@danielgafni

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!")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions