Description
In diffs of pages starting with comments / pragmas, line anchors are offset by the number of comment lines!
Steps to reproduce
- add a change to the LAST line in this page.
Example
Link to line 59 does not work in http://moinmoin.wikiwikiweb.de/MoinMoinBugs/DiffAnchorOffset?action=diff&rev2=2&rev1=1#line-59
Details
MoinMoin Version |
|
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Workaround
Discussion
Solution: do not start at 1, but count the lines that are removed from the page in the pre-parsing stage, in the while loop that collects meta-data.
Added start_line kw arg to the Parser.init(). Right now only supported by wiki Parser. Long term solution would be to pass the processing instructions to the parsers. But right now this breaks all but the wiki parser which support processing instruction for the graphical editor.
Plan
- Priority:
- Assigned to:
- Status: fixed in patch 152
change in last line!