本文整理了Java中org.commonmark.node.Node.unlink()
方法的一些代码示例,展示了Node.unlink()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.unlink()
方法的具体详情如下:
包路径:org.commonmark.node.Node
类名称:Node
方法名:unlink
暂无
代码示例来源:origin: atlassian/commonmark-java
public void insertAfter(Node sibling) {
sibling.unlink();
sibling.next = this.next;
if (sibling.next != null) {
sibling.next.prev = sibling;
}
sibling.prev = this;
this.next = sibling;
sibling.parent = this.parent;
if (sibling.next == null) {
sibling.parent.lastChild = sibling;
}
}
代码示例来源:origin: atlassian/commonmark-java
public void insertBefore(Node sibling) {
sibling.unlink();
sibling.prev = this.prev;
if (sibling.prev != null) {
sibling.prev.next = sibling;
}
sibling.next = this;
this.prev = sibling;
sibling.parent = this.parent;
if (sibling.prev == null) {
sibling.parent.firstChild = sibling;
}
}
代码示例来源:origin: atlassian/commonmark-java
public void appendChild(Node child) {
child.unlink();
child.setParent(this);
if (this.lastChild != null) {
this.lastChild.next = child;
child.prev = this.lastChild;
this.lastChild = child;
} else {
this.firstChild = child;
this.lastChild = child;
}
}
代码示例来源:origin: atlassian/commonmark-java
public void prependChild(Node child) {
child.unlink();
child.setParent(this);
if (this.firstChild != null) {
this.firstChild.prev = child;
child.next = this.firstChild;
this.firstChild = child;
} else {
this.firstChild = child;
this.lastChild = child;
}
}
代码示例来源:origin: atlassian/commonmark-java
private void mergeIfNeeded(Text first, Text last, int textLength) {
if (first != null && last != null && first != last) {
StringBuilder sb = new StringBuilder(textLength);
sb.append(first.getLiteral());
Node node = first.getNext();
Node stop = last.getNext();
while (node != stop) {
sb.append(((Text) node).getLiteral());
Node unlink = node;
node = node.getNext();
unlink.unlink();
}
String literal = sb.toString();
first.setLiteral(literal);
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
public void insertAfter(Node sibling) {
sibling.unlink();
sibling.next = this.next;
if (sibling.next != null) {
sibling.next.prev = sibling;
}
sibling.prev = this;
this.next = sibling;
sibling.parent = this.parent;
if (sibling.next == null) {
sibling.parent.lastChild = sibling;
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
public void insertBefore(Node sibling) {
sibling.unlink();
sibling.prev = this.prev;
if (sibling.prev != null) {
sibling.prev.next = sibling;
}
sibling.next = this;
this.prev = sibling;
sibling.parent = this.parent;
if (sibling.prev == null) {
sibling.parent.firstChild = sibling;
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
public void appendChild(Node child) {
child.unlink();
child.setParent(this);
if (this.lastChild != null) {
this.lastChild.next = child;
child.prev = this.lastChild;
this.lastChild = child;
} else {
this.firstChild = child;
this.lastChild = child;
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
public void prependChild(Node child) {
child.unlink();
child.setParent(this);
if (this.firstChild != null) {
this.firstChild.prev = child;
child.next = this.firstChild;
this.firstChild = child;
} else {
this.firstChild = child;
this.lastChild = child;
}
}
代码示例来源:origin: org.symphonyoss.symphony/messageml
@Override
public void process(Text opener, Text closer, int delimiterUse) {
Node node = opener.getNext();
if (node instanceof Text) {
Node result = createNode((Text) node);
if (result != null) {
opener.insertAfter(result);
node.unlink();
}
}
}
}
代码示例来源:origin: com.atlassian.commonmark/commonmark
private void mergeIfNeeded(Text first, Text last, int textLength) {
if (first != null && last != null && first != last) {
StringBuilder sb = new StringBuilder(textLength);
sb.append(first.getLiteral());
Node node = first.getNext();
Node stop = last.getNext();
while (node != stop) {
sb.append(((Text) node).getLiteral());
Node unlink = node;
node = node.getNext();
unlink.unlink();
}
String literal = sb.toString();
first.setLiteral(literal);
}
}
代码示例来源:origin: noties/Markwon
);
iconGroupNode.appendChild(iconNode);
next.unlink();
handled = true;
内容来源于网络,如有侵权,请联系作者删除!