mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
lint: src/node/utils/ImportHtml.js
This commit is contained in:
parent
a41b4b8e45
commit
85d1dc8d71
1 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* Copyright Yaco Sistemas S.L. 2011.
|
* Copyright Yaco Sistemas S.L. 2011.
|
||||||
*
|
*
|
||||||
|
@ -15,8 +16,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
const Changeset = require('../../static/js/Changeset');
|
||||||
const contentcollector = require('ep_etherpad-lite/static/js/contentcollector');
|
const contentcollector = require('../../static/js/contentcollector');
|
||||||
const cheerio = require('cheerio');
|
const cheerio = require('cheerio');
|
||||||
const rehype = require('rehype');
|
const rehype = require('rehype');
|
||||||
const minifyWhitespace = require('rehype-minify-whitespace');
|
const minifyWhitespace = require('rehype-minify-whitespace');
|
||||||
|
@ -69,7 +70,7 @@ exports.setPadHTML = async (pad, html) => {
|
||||||
apiLogger.debug(newText);
|
apiLogger.debug(newText);
|
||||||
const newAttribs = `${result.lineAttribs.join('|1+1')}|1+1`;
|
const newAttribs = `${result.lineAttribs.join('|1+1')}|1+1`;
|
||||||
|
|
||||||
function eachAttribRun(attribs, func /* (startInNewText, endInNewText, attribs)*/) {
|
const eachAttribRun = (attribs, func /* (startInNewText, endInNewText, attribs)*/) => {
|
||||||
const attribsIter = Changeset.opIterator(attribs);
|
const attribsIter = Changeset.opIterator(attribs);
|
||||||
let textIndex = 0;
|
let textIndex = 0;
|
||||||
const newTextStart = 0;
|
const newTextStart = 0;
|
||||||
|
@ -82,7 +83,7 @@ exports.setPadHTML = async (pad, html) => {
|
||||||
}
|
}
|
||||||
textIndex = nextIndex;
|
textIndex = nextIndex;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// create a new changeset with a helper builder object
|
// create a new changeset with a helper builder object
|
||||||
const builder = Changeset.builder(1);
|
const builder = Changeset.builder(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue