mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 01:46:14 -04:00
code tidy up: always evaluates
This commit is contained in:
parent
1b8cd0747d
commit
0f8f2b88ae
4 changed files with 5 additions and 5 deletions
|
@ -87,7 +87,7 @@ Pad.prototype.appendRevision = async function appendRevision(aChangeset, author)
|
||||||
|
|
||||||
// ex. getNumForAuthor
|
// ex. getNumForAuthor
|
||||||
if (author !== '') {
|
if (author !== '') {
|
||||||
this.pool.putAttrib(['author', author || '']);
|
this.pool.putAttrib(['author', author]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newRev % 100 === 0) {
|
if (newRev % 100 === 0) {
|
||||||
|
|
|
@ -314,7 +314,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
|
||||||
await hooks.aCallAll('getLineHTMLForExport', context);
|
await hooks.aCallAll('getLineHTMLForExport', context);
|
||||||
// To create list parent elements
|
// To create list parent elements
|
||||||
if ((!prevLine || prevLine.listLevel !== line.listLevel) ||
|
if ((!prevLine || prevLine.listLevel !== line.listLevel) ||
|
||||||
(prevLine && line.listTypeName !== prevLine.listTypeName)) {
|
(line.listTypeName !== prevLine.listTypeName)) {
|
||||||
const exists = _.find(openLists, (item) => (
|
const exists = _.find(openLists, (item) => (
|
||||||
item.level === line.listLevel && item.type === line.listTypeName)
|
item.level === line.listLevel && item.type === line.listTypeName)
|
||||||
);
|
);
|
||||||
|
@ -414,7 +414,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
|
||||||
if ((!nextLine ||
|
if ((!nextLine ||
|
||||||
!nextLine.listLevel ||
|
!nextLine.listLevel ||
|
||||||
nextLine.listLevel < line.listLevel) ||
|
nextLine.listLevel < line.listLevel) ||
|
||||||
(nextLine && line.listTypeName !== nextLine.listTypeName)) {
|
(line.listTypeName !== nextLine.listTypeName)) {
|
||||||
let nextLevel = 0;
|
let nextLevel = 0;
|
||||||
if (nextLine && nextLine.listLevel) {
|
if (nextLine && nextLine.listLevel) {
|
||||||
nextLevel = nextLine.listLevel;
|
nextLevel = nextLine.listLevel;
|
||||||
|
|
|
@ -3782,7 +3782,7 @@ function Ace2Inner() {
|
||||||
|
|
||||||
// We apply the height of a line in the doc body, to the corresponding sidediv line number
|
// We apply the height of a line in the doc body, to the corresponding sidediv line number
|
||||||
const updateLineNumbers = () => {
|
const updateLineNumbers = () => {
|
||||||
if (!currentCallStack || currentCallStack && !currentCallStack.domClean) return;
|
if (!currentCallStack || !currentCallStack.domClean) return;
|
||||||
|
|
||||||
// Refs #4228, to avoid layout trashing, we need to first calculate all the heights,
|
// Refs #4228, to avoid layout trashing, we need to first calculate all the heights,
|
||||||
// and then apply at once all new height to div elements
|
// and then apply at once all new height to div elements
|
||||||
|
|
|
@ -195,7 +195,7 @@ const makeContentCollector = (collectStyles, abrowser, apool, className2Author)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listType === 'none' || !listType) {
|
if (listType === 'none') {
|
||||||
delete state.lineAttributes.list;
|
delete state.lineAttributes.list;
|
||||||
} else {
|
} else {
|
||||||
state.lineAttributes.list = listType;
|
state.lineAttributes.list = listType;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue