markdown-include icon indicating copy to clipboard operation
markdown-include copied to clipboard

More dynamic line ranges

Open BlakeFreer opened this issue 1 year ago • 0 comments

Current line ranges can only support fixed line numbers, which means you cannot:

  1. get "all lines after line 5". Currently, you could use lines=5-99999 but this is not robust and raises a warning.
  2. Include the "last 10 lines" since you do not know these line numbers

Potential fixes could use syntax like:

  1. lines=5-END or lines=5-
  2. lines=-10-END following the Python slicing syntax where negative indices count from the end

BlakeFreer avatar Aug 06 '24 20:08 BlakeFreer