@Override public void handle( @NonNull SpannableConfiguration configuration, @NonNull SpannableBuilder builder, @NonNull HtmlTag tag) { if (tag.isBlock()) { visitChildren(configuration, builder, tag.getAsBlock()); } SpannableBuilder.setSpans( builder, configuration.factory().strikethrough(), tag.start(), tag.end() ); } }
@Override public void visit(CustomNode customNode) { if (customNode instanceof Strikethrough) { final int length = builder.length(); visitChildren(customNode); setSpan(length, factory.strikethrough()); } else if (customNode instanceof TaskListItem) { // new in 1.0.1 final TaskListItem listItem = (TaskListItem) customNode; final int length = builder.length(); blockIndent += listItem.indent(); visitChildren(customNode); setSpan(length, factory.taskListItem(theme, blockIndent, listItem.done())); if (hasNext(customNode)) { newLine(); } blockIndent -= listItem.indent(); } else if (!handleTableNodes(customNode)) { super.visit(customNode); } }