本文整理汇总了Java中com.github.rjeschke.txtmark.Configuration类的典型用法代码示例。如果您正苦于以下问题:Java Configuration类的具体用法?Java Configuration怎么用?Java Configuration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Configuration类属于com.github.rjeschke.txtmark包,在下文中一共展示了Configuration类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: useTxtMark
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
private String useTxtMark(String text) {
boolean safeMode = store.getBoolean(Prefs.EDITOR_TXTMARK_SAFEMODE);
boolean extended = store.getBoolean(Prefs.EDITOR_TXTMARK_EXTENDED);
boolean dotMode = store.getBoolean(Prefs.EDITOR_DOTMODE_ENABLED);
Builder builder = Configuration.builder();
if (safeMode) builder.enableSafeMode();
if (extended || dotMode) builder.forceExtentedProfile();
if (dotMode) builder.setCodeBlockEmitter(emitter);
Configuration config = builder.build();
return Processor.process(text, config);
}
开发者ID:grosenberg,项目名称:fluentmark,代码行数:13,代码来源:FluentMkConverter.java
示例2: getBody
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
private String getBody(String filepath) throws IOException {
if(filepath.startsWith("file:///android_asset")) {
String fileName = filepath.substring(filepath.lastIndexOf('/')+1);
InputStream inputStream = getContext().getAssets().open(fileName);
return Processor.process(inputStream, Configuration.builder().forceExtentedProfile().build());
} else {
File file = new File(filepath);
return Processor.process(file, Configuration.builder().forceExtentedProfile().build());
}
}
开发者ID:nindalf,项目名称:markdown-droid,代码行数:11,代码来源:MarkdownView.java
示例3: Parser
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
/**
* creates a parser with configuration set to enable safe mode HTML with
* extended profile from txtmark, allowing spaces in fenced code blocks and
* encoding set to UTF-8.
*
* @throws java.io.IOException the exception
*/
public Parser() throws IOException {
indexer = new Indexer();
renderer = new HandlebarsRenderer();
renderConfig = Configuration.builder().enableSafeMode()
.forceExtentedProfile()
.setAllowSpacesInFencedCodeBlockDelimiters(true)
.setEncoding("UTF-8")
.setCodeBlockEmitter(new CodeBlockEmitter())
.build();
indexer.initIndexes();
}
开发者ID:pawandubey,项目名称:griffin,代码行数:19,代码来源:Parser.java
示例4: setSite
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
@Override
public void setSite(Site site) {
this.highlighter = site.getFactory().getHighlighter();
if (this.highlighter == null) {
log.warn("This converter might be need a Highlighter.");
} else {
config = Configuration.builder()
.setCodeBlockEmitter(new BlockEmitterImpl(highlighter))
.forceExtentedProfile()
.build();
}
}
开发者ID:opoo,项目名称:opoopress,代码行数:13,代码来源:TxtmarkMarkdownConverter.java
示例5: builder
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
protected Builder builder() {
decorator = new ExtDecorator();
return Configuration.builder().forceExtentedProfile().convertNewline2Br().registerPlugins(new YumlPlugin()).setDecorator(decorator)
.setCodeBlockEmitter(codeBlockEmitter()).setSpecialLinkEmitter(spanEmitter()).setEmojiEmitter(emojiEmitter());
}
开发者ID:billy1380,项目名称:markdown4j-gwt,代码行数:7,代码来源:AbstractMarkdownProcessor.java
示例6: builder
import com.github.rjeschke.txtmark.Configuration; //导入依赖的package包/类
private Builder builder() {
decorator = new ExtDecorator();
return Configuration.builder().forceExtentedProfile().registerPlugins(new YumlPlugin(), new WebSequencePlugin(), new IncludePlugin()).convertNewline2Br().setDecorator(decorator).setCodeBlockEmitter(new CodeBlockEmitter());
}
开发者ID:abdollahpour,项目名称:xweb-wiki,代码行数:5,代码来源:Markdown4jProcessor.java
注:本文中的com.github.rjeschke.txtmark.Configuration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论