com.vladsch.flexmark.ext.zzzzzz.internal.ZzzzzzInlineParserExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flexmark-ext-zzzzzz Show documentation
Show all versions of flexmark-ext-zzzzzz Show documentation
flexmark-java extension for zzzzzz
package com.vladsch.flexmark.ext.zzzzzz.internal;
import com.vladsch.flexmark.ext.zzzzzz.Zzzzzz;
import com.vladsch.flexmark.parser.InlineParser;
import com.vladsch.flexmark.parser.InlineParserExtension;
import com.vladsch.flexmark.parser.InlineParserExtensionFactory;
import com.vladsch.flexmark.parser.LightInlineParser;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class ZzzzzzInlineParserExtension implements InlineParserExtension {
private List openZzzzzzs;
public ZzzzzzInlineParserExtension(LightInlineParser inlineParser) {
this.openZzzzzzs = new ArrayList<>();
}
@Override
public void finalizeDocument(@NotNull InlineParser inlineParser) {
}
@Override
public void finalizeBlock(@NotNull InlineParser inlineParser) {
for (int j = openZzzzzzs.size(); j-- > 0; ) {
inlineParser.moveNodes(openZzzzzzs.get(j), inlineParser.getBlock().getLastChild());
}
openZzzzzzs.clear();
}
@Override
public boolean parse(@NotNull LightInlineParser inlineParser) {
return false;
}
public static class Factory implements InlineParserExtensionFactory {
@Nullable
@Override
public Set> getAfterDependents() {
return null;
}
@NotNull
@Override
public CharSequence getCharacters() {
return "";
}
@Nullable
@Override
public Set> getBeforeDependents() {
return null;
}
@NotNull
@Override
public InlineParserExtension apply(@NotNull LightInlineParser lightInlineParser) {
return new ZzzzzzInlineParserExtension(lightInlineParser);
}
@Override
public boolean affectsGlobalScope() {
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy