Skip to content

Commit 91588cf

Browse files
committed
no-license: Show correct line number after skipping lines
Signed-off-by: Daniel Lim Wee Soong <weesoong.lim@gmail.com>
1 parent 8a7dc5c commit 91588cf

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)