}
@Override
public int processLineContent(String line,int offset) {
if (blockLineCount == 0) {
ListAttributes attributes = new ListAttributes();
String spaces = matcher.group(1);
String listSpec = matcher.group(2);
String numericListSpec = matcher.group(3);
if (numericListSpec != null && !"1".equals(numericListSpec)) {
attributes.setStart(numericListSpec);
}
int level = calculateLevel(spaces);
BlockType type = listSpec == null?BlockType.NUMERIC_LIST:BlockType.BULLETED_LIST;
if (type == BlockType.BULLETED_LIST && "-".equals(listSpec)) {
attributes.setCssStyle("list-style: square");
}
offset = matcher.start(LINE_REMAINDER_GROUP_OFFSET);
listState.push(new ListState(level,spaces.length(),type));
builder.beginBlock(type, attributes);
} else {
ListAttributes attributes = new ListAttributes();
Matcher matcher = startPattern.matcher(line);
if (!matcher.matches()) {
setClosed(true);
return 0;
}
String spaces = matcher.group(1);
String listSpec = matcher.group(2);
String numericListSpec = matcher.group(3);
if (numericListSpec != null && !"1".equals(numericListSpec)) {
attributes.setStart(numericListSpec);
}
int level = calculateLevel(spaces);
BlockType type = listSpec == null?BlockType.NUMERIC_LIST:BlockType.BULLETED_LIST;