Description
Line number spans for process instruction lines are missed in output, wich may lead to wrong line number linking/
Steps to reproduce
- Create page with process instructions and/or comments at the beggining of page
- Add parser block to page
Example
http://master19.moinmo.in/4ct10n/info/WikiSandBox?action=diff&rev2=220&rev1=218#line-1
Component selection
- parser/formatter
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
- Priority:
- Assigned to:
Status: Fixed in http://hg.moinmo.in/moin/1.9/rev/cd2696f05fc5, http://hg.moinmo.in/moin/1.9/rev/5886d3b46063 and http://hg.moinmo.in/moin/1.9/rev/172d77f67e0a (moin_wiki, plain text and highligt parsers fixed), updated in http://hg.moinmo.in/moin/1.9/rev/ed7044b59397.