Description

Line number spans for process instruction lines are missed in output, wich may lead to wrong line number linking/

Steps to reproduce

  1. Create page with process instructions and/or comments at the beggining of page
  2. Add parser block to page

Example

http://master19.moinmo.in/4ct10n/info/WikiSandBox?action=diff&rev2=220&rev1=218#line-1

Component selection

Details

MoinMoin Version

This Wiki

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

   1 diff -r 63df8c7b82b2 MoinMoin/parser/text_moin_wiki.py
   2 --- a/MoinMoin/parser/text_moin_wiki.py Tue Jan 12 22:27:07 2010 +0100
   3 +++ b/MoinMoin/parser/text_moin_wiki.py Thu Jan 14 22:43:30 2010 +0300
   4 @@ -1435,6 +1435,10 @@
   5          rawtext = self.raw.expandtabs()
   6  
   7          # go through the lines
   8 +
   9 +        for lineno in range(1, self.start_line):
  10 +            self.request.write(self.formatter.line_anchordef(lineno))
  11 +
  12          self.lineno = self.start_line
  13          self.lines = self.eol_re.split(rawtext)
  14          self.line_is_empty = 0

Looks like the similiar patch should be applied to every parser which supports line numbering: creole, etc.

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/LineNumberSpansForProcessInstructionsMissed (last edited 2010-03-10 02:25:02 by EugeneSyromyatnikov)