Skip to content

Conversation

@epinzur
Copy link

@epinzur epinzur commented Nov 3, 2023

Added support for string-based attributes. Also added 2 new range attributes: start-after and end-before.

This addition is based on the Sphinx literal-include directive: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude

It allows you to specify the code-block range using code comments instead of line numbers. This allows for editing of the included code file without having to re-figure-out the numeric ranges you want to include.

You can now specify the start and end of code blocks via string labels. 

This greatly improves the experience because you can edit the source file and rely on the string labels to grab the correct code blocks.

No more adjusting line numbers after making edits
@epinzur epinzur force-pushed the esp/support_string_tags branch from f8a9bfe to 33d6844 Compare November 3, 2023 12:50
@epinzur epinzur force-pushed the esp/support_string_tags branch from 33d6844 to 4d951ec Compare November 3, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant