Skip to content

Commit

Permalink
1-indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich authored Jun 6, 2024
1 parent b1b788d commit ceb5510
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/superfences_ponylang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ def format(source, language, css_class, options, md, classes=None, id_value='',
for lineNum in lineNumbers:
if '-' in lineNum:
start, end = lineNum.split('-')
if i >= int(start) and i <= int(end):
if (i + 1) >= int(start) and (i + 1) <= int(end):
lines.append(line)
_lines[i] = (lineNumbers, line)
elif i == int(lineNum):
elif (i + 1) == int(lineNum):
lines.append(line)
_lines[i] = (lineNumbers, line)
else:
_lines[i] = (lineNumbers, None)
#source = str(lines)
source = str(_lines)

Expand Down

0 comments on commit ceb5510

Please sign in to comment.