本文整理了Java中com.vladsch.flexmark.util.html.Attributes.addValue()
方法的一些代码示例,展示了Attributes.addValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attributes.addValue()
方法的具体详情如下:
包路径:com.vladsch.flexmark.util.html.Attributes
类名称:Attributes
方法名:addValue
暂无
代码示例来源:origin: vsch/flexmark-java
@Override
public T attr(CharSequence attrName, CharSequence value) {
if (currentAttributes == null) {
currentAttributes = new Attributes();
}
currentAttributes.addValue(attrName, value);
return (T) this;
}
代码示例来源:origin: vsch/flexmark-java
private void setLinkAttributes(AttributablePart part, Attributes attributes) {
if (part == LINK) {
String linkStatus = attributes.getValue(LINK_STATUS_ATTR);
if (LinkStatus.NOT_FOUND.isStatus(linkStatus)) {
attributes.addValue("class", missingTargetClass);
} else if (ZzzzzzExtension.LOCAL_ONLY.isStatus(linkStatus)) {
attributes.addValue("class", localOnlyTargetClass);
}
}
}
代码示例来源:origin: vsch/flexmark-java
void transferIdToParent() {
if (myStateStack.isEmpty())
throw new IllegalStateException("transferIdToParent with an empty stack");
final Attribute attribute = myState.myAttributes.get("id");
myState.myAttributes.remove("id");
if (attribute != null && !attribute.getValue().isEmpty()) {
State state = myStateStack.peek();
if (state != null) {
state.myAttributes.addValue("id", attribute.getValue());
}
}
}
代码示例来源:origin: vsch/flexmark-java
public Attribute addValue(Attribute attribute) {
return addValue(attribute.getName(), attribute.getValue());
}
代码示例来源:origin: vsch/flexmark-java
private void transferToParentOnly(String... includes) {
if (myStateStack.isEmpty())
throw new IllegalStateException("transferIdToParent with an empty stack");
final Attributes attributes = new Attributes();
for (String include : includes) {
Attribute attribute = myState.myAttributes.get(include);
if (attribute != null) {
myState.myAttributes.remove(include);
attributes.addValue(attribute);
}
}
if (!attributes.isEmpty()) {
final State parentState = myStateStack.peek();
for (String attrName : attributes.keySet()) {
parentState.myAttributes.addValue(attributes.get(attrName));
}
}
}
代码示例来源:origin: vsch/flexmark-java
@Override
public T attr(Attribute... attribute) {
if (currentAttributes == null) {
currentAttributes = new Attributes();
}
for (Attribute attr : attribute) {
currentAttributes.addValue(attr.getName(), attr.getValue());
}
return (T) this;
}
代码示例来源:origin: vsch/flexmark-java
private void transferToParentExcept(String... excludes) {
if (myStateStack.isEmpty())
throw new IllegalStateException("transferIdToParent with an empty stack");
final Attributes attributes = new Attributes(myState.myAttributes);
myState.myAttributes.clear();
for (String exclude : excludes) {
myState.myAttributes.addValue(attributes.get(exclude));
attributes.remove(exclude);
}
if (!attributes.isEmpty()) {
final State parentState = myStateStack.peek();
for (String attrName : attributes.keySet()) {
parentState.myAttributes.addValue(attributes.get(attrName));
}
}
}
代码示例来源:origin: vsch/flexmark-java
public Attributes addValues(Attributes attributes) {
for (Attribute attribute : attributes.values()) {
addValue(attribute.getName(), attribute.getValue());
}
return this;
}
代码示例来源:origin: vsch/flexmark-java
attributes.remove(attributeNodeName);
attributes.addValue(attributeNodeName, attributeNode.getValue());
} else {
attributes.addValue(CLASS_ATTR, attributeNode.getValue());
} else if (attributeNode.isId()) {
if (node instanceof AnchorRefTarget) {
attributes.addValue(Attribute.ID_ATTR, attributeNode.getValue());
代码示例来源:origin: com.vladsch.flexmark/flexmark-util
@Override
public T attr(CharSequence attrName, CharSequence value) {
if (currentAttributes == null) {
currentAttributes = new Attributes();
}
currentAttributes.addValue(attrName, value);
return (T) this;
}
代码示例来源:origin: walokra/markdown-page-generator-plugin
attributes.addValue(attributeNameValue[0], value);
} else {
attributes.addValue(attributeNameValue[0], attributeNameValue[0]);
代码示例来源:origin: com.vladsch.flexmark/flexmark-util
public Attribute addValue(Attribute attribute) {
return addValue(attribute.getName(), attribute.getValue());
}
代码示例来源:origin: com.vladsch.flexmark/flexmark-util
public Attributes addValues(Attributes attributes) {
for (Attribute attribute : attributes.values()) {
addValue(attribute.getName(), attribute.getValue());
}
return this;
}
代码示例来源:origin: com.vladsch.flexmark/flexmark-util
@Override
public T attr(Attribute... attribute) {
if (currentAttributes == null) {
currentAttributes = new Attributes();
}
for (Attribute attr : attribute) {
currentAttributes.addValue(attr.getName(), attr.getValue());
}
return (T) this;
}
代码示例来源:origin: com.vladsch.flexmark/flexmark-ext-attributes
attributes.remove(attributeNodeName);
attributes.addValue(attributeNodeName, attributeNode.getValue());
} else {
attributes.addValue(CLASS_ATTR, attributeNode.getValue());
} else if (attributeNode.isId()) {
if (node instanceof AnchorRefTarget) {
attributes.addValue(Attribute.ID_ATTR, attributeNode.getValue());
内容来源于网络,如有侵权,请联系作者删除!