@Override public void visit(TableCellNode node) { if (inTableHeader) { for (Node child : node.getChildren()) { String title; if (child instanceof ExpLinkNode) { ExpLinkNode linkNode = (ExpLinkNode) child; title = linkNode.title; if (title == null) { throw new IllegalStateException(String.format("No title found for link node with url '%s'", linkNode.url)); } pendingCommand = statementParser.parse(title, ""); } else if (child instanceof RefLinkNode) { LinkNode linkNode = toLinkNode((RefLinkNode) child); title = linkNode.getTitle(); if (title == null) { throw new IllegalStateException(String.format("No title found for link node with reference '%s'. This can be caused by the associated link text being empty.", linkNode.getText())); } pendingCommand = statementParser.parse(title, ""); } } } // Call the super visit(TableCellNode) method and override visit(TableColumnNode) below, so that the concordion commands are added to the <th> tag escapeHtmlNodes = true; super.visit(node); escapeHtmlNodes = false; }
@Override public void visit(TableCellNode node) { if (inTableHeader) { for (Node child : node.getChildren()) { String title; if (child instanceof ExpLinkNode) { ExpLinkNode linkNode = (ExpLinkNode) child; title = linkNode.title; if (title == null) { throw new IllegalStateException(String.format("No title found for link node with url '%s'", linkNode.url)); } pendingCommand = statementParser.parse(title, ""); } else if (child instanceof RefLinkNode) { LinkNode linkNode = toLinkNode((RefLinkNode) child); title = linkNode.getTitle(); if (title == null) { throw new IllegalStateException(String.format("No title found for link node with reference '%s'. This can be caused by the associated link text being empty.", linkNode.getText())); } pendingCommand = statementParser.parse(title, ""); } } } // Call the super visit(TableCellNode) method and override visit(TableColumnNode) below, so that the concordion commands are added to the <th> tag escapeHtmlNodes = true; super.visit(node); escapeHtmlNodes = false; }