mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
include the callback call, for sanity and stop the pad from being nuked so early in the function
This commit is contained in:
parent
086132de66
commit
e152c477c7
2 changed files with 4 additions and 5 deletions
|
@ -25,10 +25,6 @@ function setPadHTML(pad, html, callback)
|
|||
{
|
||||
var apiLogger = log4js.getLogger("ImportHtml");
|
||||
|
||||
// Clean the pad. This makes the rest of the code easier
|
||||
// by several orders of magnitude.
|
||||
pad.setText("");
|
||||
var padText = pad.text();
|
||||
// Parse the incoming HTML with jsdom
|
||||
var doc = jsdom(html.replace(/>\n+</g, '><'));
|
||||
apiLogger.debug('html:');
|
||||
|
@ -44,6 +40,8 @@ function setPadHTML(pad, html, callback)
|
|||
return; // We don't process the HTML because it was bad..
|
||||
}
|
||||
|
||||
// console.warn("LUL WUT THE FUCK U DOIN HERE?");
|
||||
|
||||
var result = cc.finish();
|
||||
|
||||
apiLogger.debug('Lines:');
|
||||
|
@ -90,6 +88,7 @@ function setPadHTML(pad, html, callback)
|
|||
// the changeset is ready!
|
||||
var theChangeset = builder.toString();
|
||||
apiLogger.debug('The changeset: ' + theChangeset);
|
||||
pad.setText("");
|
||||
pad.appendRevision(theChangeset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue