exports._analyzeLine = function(text, aline, apool){ var line = {}; // identify list var lineMarker = 0; line.listLevel = 0; if (aline){ var opIter = Changeset.opIterator(aline); if (opIter.hasNext()){ var listType = Changeset.opAttributeValue(opIter.next(), 'list', apool); if (listType){ lineMarker = 1; listType = /([a-z]+)([12345678])/.exec(listType); if (listType){ line.listTypeName = listType[1]; line.listLevel = Number(listType[2]); } } } } if (lineMarker){ line.text = text.substring(1); line.aline = Changeset.subattribution(aline, 1); } else{ line.text = text; line.aline = aline; } return line; };
function _analyzeLine(alineAttrs, apool) { var header = null; if (alineAttrs) { var opIter = Changeset.opIterator(alineAttrs); if (opIter.hasNext()) { var op = opIter.next(); header = Changeset.opAttributeValue(op, 'pageBreak', apool); } } return header; }
function _analyzeLine(alineAttrs, apool) { var context = null; if (alineAttrs) { var opIter = Changeset.opIterator(alineAttrs); if (opIter.hasNext()) { var op = opIter.next(); context = Changeset.opAttributeValue(op, 'context', apool); } } return context; }
var hasMarker = _.find(AttributeManager.lineAttributes, function(attribute){ return Changeset.opAttributeValue(op, attribute, apool); }) !== undefined;