class TaskListItemVisitor extends AbstractVisitor {

        @Override
        public void visit(ListItem listItem) {<FILL_FUNCTION_BODY>}
    }

            Node child = listItem.getFirstChild();
            if (child instanceof Paragraph) {
                Node node = child.getFirstChild();
                if (node instanceof Text) {
                    Text textNode = (Text) node;
                    Matcher matcher = REGEX_TASK_LIST_ITEM.matcher(textNode.getLiteral());
                    if (matcher.matches()) {
                        String checked = matcher.group(1);
                        boolean isChecked = Objects.equals(checked, "X") || Objects.equals(checked, "x");

                        // Add the task list item marker node as the first child of the list item.
                        listItem.prependChild(new TaskListItemMarker(isChecked));

                        // Parse the node using the input after the task marker (in other words, group 2 from the matcher).
                        // (Note that the String has been trimmed, so we should add a space between the
                        // TaskListItemMarker and the text that follows it when we come to render it).
                        textNode.setLiteral(matcher.group(2));
                    }
                }
            }
            visitChildren(listItem);
        
<no_super_class>