arturobernalg opened a new pull request, #558:
URL: https://github.com/apache/jspwiki/pull/558

   The table of contents read the saved text of the page, so a preview listed 
the headings of the saved version and not those of the text being edited 
(JSPWIKI-584).
   
   The rendering manager now keeps the text it translates in a new context 
variable, Context.VAR_RENDERED_TEXT, and TableOfContents uses it before falling 
back to the saved text. The previous value is put back when the rendering ends, 
because InsertPage renders another page in the middle of a page. The Context 
interface gains one constant.
   
   Behaviour change, from reading the code and not tested: when InsertPage 
inserts only a section of a page, or cuts it at a maximum length, a table of 
contents inside the inserted text now lists the headings of the inserted part 
and not those of the whole inserted page.
   
   Tests: three tests in TableOfContentsTest. Without the change the one that 
renders an edited text with a new heading fails, because the heading is missing 
from the list. The tests for the context after rendering and for a table of 
contents placed after an inserted page are guards, and they also pass without 
the change. The whole jspwiki-main suite passes with the change: 1107 tests, 0 
failures. Before the change I saw the problem in the HTML of both previews, 
Preview.jsp and AJAXPreview.jsp. I did not repeat that run in a browser with 
the change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to