mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
ExportHelper: Simplify _analyzeLine()
a bit
This commit is contained in:
parent
d8cbd134d3
commit
a7c78768a1
1 changed files with 3 additions and 5 deletions
|
@ -53,7 +53,8 @@ exports._analyzeLine = (text, aline, apool) => {
|
|||
if (aline) {
|
||||
const opIter = Changeset.opIterator(aline);
|
||||
if (opIter.hasNext()) {
|
||||
let listType = Changeset.opAttributeValue(opIter.next(), 'list', apool);
|
||||
const op = opIter.next();
|
||||
let listType = Changeset.opAttributeValue(op, 'list', apool);
|
||||
if (listType) {
|
||||
lineMarker = 1;
|
||||
listType = /([a-z]+)([0-9]+)/.exec(listType);
|
||||
|
@ -62,10 +63,7 @@ exports._analyzeLine = (text, aline, apool) => {
|
|||
line.listLevel = Number(listType[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
const opIter2 = Changeset.opIterator(aline);
|
||||
if (opIter2.hasNext()) {
|
||||
const start = Changeset.opAttributeValue(opIter2.next(), 'start', apool);
|
||||
const start = Changeset.opAttributeValue(op, 'start', apool);
|
||||
if (start) {
|
||||
line.start = start;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue