mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04: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) {
|
if (aline) {
|
||||||
const opIter = Changeset.opIterator(aline);
|
const opIter = Changeset.opIterator(aline);
|
||||||
if (opIter.hasNext()) {
|
if (opIter.hasNext()) {
|
||||||
let listType = Changeset.opAttributeValue(opIter.next(), 'list', apool);
|
const op = opIter.next();
|
||||||
|
let listType = Changeset.opAttributeValue(op, 'list', apool);
|
||||||
if (listType) {
|
if (listType) {
|
||||||
lineMarker = 1;
|
lineMarker = 1;
|
||||||
listType = /([a-z]+)([0-9]+)/.exec(listType);
|
listType = /([a-z]+)([0-9]+)/.exec(listType);
|
||||||
|
@ -62,10 +63,7 @@ exports._analyzeLine = (text, aline, apool) => {
|
||||||
line.listLevel = Number(listType[2]);
|
line.listLevel = Number(listType[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
const start = Changeset.opAttributeValue(op, 'start', apool);
|
||||||
const opIter2 = Changeset.opIterator(aline);
|
|
||||||
if (opIter2.hasNext()) {
|
|
||||||
const start = Changeset.opAttributeValue(opIter2.next(), 'start', apool);
|
|
||||||
if (start) {
|
if (start) {
|
||||||
line.start = start;
|
line.start = start;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue