Closed jacob-g closed 6 years ago
Second
I'm S-zhangcha, just in case you were wondering
Another example: https://en.scratch-wiki.info/w/index.php?diff=195423
Yet another: https://en.scratch-wiki.info/w/index.php?diff=195530
Per suggestion of kenny2scratch, this can be improved by using the unified DIFF instead of the HTML DIFF. See http://php.net/manual/en/function.xdiff-string-diff.php
The new codebase passes on all of these edits. Hopefully it's good enough now.
https://en.scratch-wiki.info/w/index.php?diff=192173 should be detected as being at the beginning of a page, but since there are two blank lines before the header, the first header isn't detected as being after it.
https://en.scratch-wiki.info/w/index.php?diff=192138 does not add a full line.
Additionally, there should be a way to test this on arbitrary edits (convert this into a function of the page contents and diff rather than just a section of the loop).