Make line numbers start on 1 (not 0).
This is the behavior on most tools and starting with 0 was confusing at times.
This commit is contained in:
parent
28a63a7e5e
commit
4ebd6bfd86
@ -1044,10 +1044,9 @@ class OrgDomReader:
|
|||||||
line_count = len(lines)
|
line_count = len(lines)
|
||||||
reader = enumerate(lines)
|
reader = enumerate(lines)
|
||||||
|
|
||||||
for linenum, line in reader:
|
for lnum, line in reader:
|
||||||
|
linenum = lnum + 1
|
||||||
try:
|
try:
|
||||||
last_line = linenum + 1 == line_count
|
|
||||||
|
|
||||||
if m := RAW_LINE_RE.match(line):
|
if m := RAW_LINE_RE.match(line):
|
||||||
self.add_raw_line(linenum, line)
|
self.add_raw_line(linenum, line)
|
||||||
elif m := HEADLINE_RE.match(line):
|
elif m := HEADLINE_RE.match(line):
|
||||||
|
Loading…
Reference in New Issue
Block a user