facelessuser / pymdown-extensions

Extensions for Python Markdown
https://facelessuser.github.io/pymdown-extensions/
Other
931 stars 248 forks source link

Code block snippet lines render blank code block, when it's just the first line #2361

Closed shaedrich closed 2 months ago

shaedrich commented 2 months ago

Description

When I embed a snippet in a code snippet, restricting the lines to :1:1, the code block is rendered empty. This can temporarily be fixed by writing ::1 (which should be equivalent), so it's not urgent or anything, but I thought, you might want to fix that.

Minimal Reproduction

  1. Create the following code block:
    --8<-- "some-code-snippet-file-path.pony:1:1"
  2. Build your site and check the result for the code block

Version(s) & System Info

facelessuser commented 2 months ago

It's actually just a problem with specifying 1 as the start. So even ranges of something like 1:4 will exclude the first line. I know what the issue is and the fix is pretty straight forward.

Thanks for brining this to my attention.

shaedrich commented 2 months ago

Sounds good, looking forward to it 👍🏻