本文整理了Java中org.commonmark.node.Node.getFirstChild()
方法的一些代码示例,展示了Node.getFirstChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getFirstChild()
方法的具体详情如下:
包路径:org.commonmark.node.Node
类名称:Node
方法名:getFirstChild
暂无
代码示例来源:origin: atlassian/commonmark-java
private void mergeChildTextNodes(Node node) {
// No children or just one child node, no need for merging
if (node.getFirstChild() == node.getLastChild()) {
return;
}
mergeTextNodesInclusive(node.getFirstChild(), node.getLastChild());
}
代码示例来源:origin: atlassian/commonmark-java
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
@Override
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
代码示例来源:origin: atlassian/commonmark-java
@Override
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
代码示例来源:origin: atlassian/commonmark-java
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
/**
* Visit the child nodes.
*
* @param parent the parent node whose children should be visited
*/
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
// A subclass of this visitor might modify the node, resulting in getNext returning a different node or no
// node after visiting it. So get the next node before visiting.
Node next = node.getNext();
node.accept(this);
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
// For last cell in row, we dont render the delimiter.
if (node instanceof TableCell && next == null) {
renderLastCell((TableCell) node);
} else {
context.render(node);
}
node = next;
}
}
}
代码示例来源:origin: atlassian/commonmark-java
private void writeLink(Node node, String title, String destination) {
boolean hasChild = node.getFirstChild() != null;
boolean hasTitle = title != null && !title.equals(destination);
boolean hasDestination = destination != null && !destination.equals("");
if (hasChild) {
textContent.write('"');
visitChildren(node);
textContent.write('"');
if (hasTitle || hasDestination) {
textContent.whitespace();
textContent.write('(');
}
}
if (hasTitle) {
textContent.write(title);
if (hasDestination) {
textContent.colon();
textContent.whitespace();
}
}
if (hasDestination) {
textContent.write(destination);
}
if (hasChild && (hasTitle || hasDestination)) {
textContent.write(')');
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
private void mergeChildTextNodes(Node node) {
// No children or just one child node, no need for merging
if (node.getFirstChild() == node.getLastChild()) {
return;
}
mergeTextNodesInclusive(node.getFirstChild(), node.getLastChild());
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
@Override
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
@Override
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark-ext-gfm-tables
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark-ext-gfm-strikethrough
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark-ext-gfm-strikethrough
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
context.render(node);
node = next;
}
}
}
代码示例来源:origin: googleapis/gapic-generator
protected void visitChildren(Node node) {
Node child = node.getFirstChild();
while (child != null) {
Node next = child.getNext();
child.accept(this);
child = next;
}
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
/**
* Visit the child nodes.
*
* @param parent the parent node whose children should be visited
*/
protected void visitChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
// A subclass of this visitor might modify the node, resulting in getNext returning a different node or no
// node after visiting it. So get the next node before visiting.
Node next = node.getNext();
node.accept(this);
node = next;
}
}
}
代码示例来源:origin: synchrony/smsn
private void visitChildren(final Node node) {
if (verbose) {
echo(node);
}
currentDepth++;
Node child = node.getFirstChild();
while (null != child) {
child.accept(this);
child = child.getNext();
}
currentDepth--;
}
代码示例来源:origin: com.atlassian.commonmark/commonmark-ext-gfm-tables
private void renderChildren(Node parent) {
Node node = parent.getFirstChild();
while (node != null) {
Node next = node.getNext();
// For last cell in row, we dont render the delimiter.
if (node instanceof TableCell && next == null) {
renderLastCell((TableCell) node);
} else {
context.render(node);
}
node = next;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!