Skip to content

Include by header #49

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 example@email.com

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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