mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
contentcollector: Use destructuring to improve readability
This commit is contained in:
parent
b547ce9a47
commit
4e220538a1
1 changed files with 1 additions and 4 deletions
|
@ -425,7 +425,7 @@ const makeContentCollector = (collectStyles, abrowser, apool, className2Author)
|
||||||
if (tname === 'br') {
|
if (tname === 'br') {
|
||||||
this.breakLine = true;
|
this.breakLine = true;
|
||||||
const tvalue = dom.getAttribute(node, 'value');
|
const tvalue = dom.getAttribute(node, 'value');
|
||||||
const induceLineBreak = hooks.callAll('collectContentLineBreak', {
|
const [startNewLine = true] = hooks.callAll('collectContentLineBreak', {
|
||||||
cc: this,
|
cc: this,
|
||||||
state,
|
state,
|
||||||
tname,
|
tname,
|
||||||
|
@ -433,9 +433,6 @@ const makeContentCollector = (collectStyles, abrowser, apool, className2Author)
|
||||||
styl: null,
|
styl: null,
|
||||||
cls: null,
|
cls: null,
|
||||||
});
|
});
|
||||||
const startNewLine = (
|
|
||||||
typeof (induceLineBreak) === 'object' &&
|
|
||||||
induceLineBreak.length === 0) ? true : induceLineBreak[0];
|
|
||||||
if (startNewLine) {
|
if (startNewLine) {
|
||||||
cc.startNewLine(state);
|
cc.startNewLine(state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue