Commits

Luke Plant committed e1c6d01

Fixed error in error message

Comments (0)

Files changed (1)

semanticeditor/utils.py

     names = {}
     for num, name in headings:
         if num > lastnum + 1:
-            raise IncorrectHeadings('Heading "%(name)s" is level H%(foundnum)d, but it should be level H%(rightnum)d or less'  % dict(name=name,foundnum=num,rightnum=lastnum))
+            raise IncorrectHeadings('Heading "%(name)s" is level H%(foundnum)d, but it should be level H%(rightnum)d or less'  % dict(name=name,foundnum=num,rightnum=lastnum+1))
         lastnum = num
         if name in names:
             raise IncorrectHeadings('There are more than one headings with the name "%s".' % name)