Skip to content

Include by header #49

Closed
Closed
@BlakeFreer

Description

@BlakeFreer

Instead of including content by line number, it would be nice to include it by section heading. This should include all content up to the next heading of equal or greater importance.

For example, given the following document called readme.md

Lorem Ipsum

Usage

Installation

Install with pip install lorem-ipsum

Importing

import lorem_ipsum

Issues

Contact me at [email protected]

Then you could include the "Usage" section (up to and excluding ## Issues) with

{!readme.md!section=usage}

Rather than needing to know the exact line numbers. This syntax plays nicely with the existing Markdown syntax where you can link to this section heading with #usage

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