Skip to content

Commit abd4b57

Browse files
authored
Merge pull request #38 from daniellimws/line-no-start
no-license: Show correct line number after skipping lines
2 parents 7a5d152 + 91588cf commit abd4b57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sphinxcontrib_verilog_diagrams/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ def run(self):
124124
first_line += 3 if code[first_line][1] == '*' else 2
125125
last_line = len(code)
126126

127+
while len(code[first_line - 1]) == 0:
128+
first_line += 1
129+
127130
self.options['lines'] = '{}-{}'.format(first_line, last_line)
131+
self.options['lineno-start'] = first_line
128132

129133
try:
130134
return LiteralInclude.run(self)

0 commit comments

Comments
 (0)