当前位置: 首页>>代码示例>>Java>>正文


Java Extensions.STRIKETHROUGH属性代码示例

本文整理汇总了Java中org.pegdown.Extensions.STRIKETHROUGH属性的典型用法代码示例。如果您正苦于以下问题:Java Extensions.STRIKETHROUGH属性的具体用法?Java Extensions.STRIKETHROUGH怎么用?Java Extensions.STRIKETHROUGH使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.pegdown.Extensions的用法示例。


在下文中一共展示了Extensions.STRIKETHROUGH属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MarkdownService

public MarkdownService () {
	markdownFileExtensions.add("md");
	markdownFileExtensions.add("txt");
	markdownFileExtensions.add("markdown");
	
	processor = new PegDownProcessor(
			Extensions.AUTOLINKS | Extensions.TABLES
			| Extensions.FENCED_CODE_BLOCKS | Extensions.STRIKETHROUGH
			| Extensions.ATXHEADERSPACE | Extensions.TASKLISTITEMS);
	
	// read style sheet
	InputStream inputStream = MarkdownService.class.getResourceAsStream(STYLE_SHEET_FILE);
	
	StringWriter writer = new StringWriter();
	
	try {
		IOUtils.copy(inputStream, writer, "UTF-8");
		styleSheet = writer.toString();
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:windsource,项目名称:evernote-markdown-sync,代码行数:22,代码来源:MarkdownService.java

示例2: process

public String process(String itemContent) {
    itemContent = new MarkdownFootnotesProcessor(itemContent).process();
    ParsedContent parsed = parseOutRawHtml(itemContent);
    PegDownProcessor pegdownProcessor = new PegDownProcessor(
            Extensions.FENCED_CODE_BLOCKS |
                    Extensions.AUTOLINKS |
                    Extensions.STRIKETHROUGH |
                    Extensions.TABLES |
                    Extensions.QUOTES |
                    Extensions.SMARTS
    );
    itemContent = pegdownProcessor.markdownToHtml(parsed.content);
    itemContent = swapInRawHtml(itemContent, parsed);
    return itemContent;
}
 
开发者ID:StallionCMS,项目名称:stallion-core,代码行数:15,代码来源:Markdown.java

示例3: extensions

public static int extensions() {

        int EXT = Extensions.NONE;

        EXT |= Extensions.FENCED_CODE_BLOCKS;
        EXT |= Extensions.TABLES;
        EXT |= Extensions.STRIKETHROUGH;
        // EXT |= Extensions.SMARTS; // Breaks link including a dash -

        return EXT;
    }
 
开发者ID:bsorrentino,项目名称:maven-confluence-plugin,代码行数:11,代码来源:ToConfluenceSerializer.java

示例4: extensionFor

private int extensionFor(String name) {
      int extension = Extensions.NONE;
if (name.equals("HARDWRAPS")) {
	extension = Extensions.HARDWRAPS;
      } else if (name.equals("AUTOLINKS")) {
          extension = Extensions.AUTOLINKS;
      } else if (name.equals("FENCED_CODE_BLOCKS")) {
          extension = Extensions.FENCED_CODE_BLOCKS;
      } else if (name.equals("DEFINITIONS")) {
          extension = Extensions.DEFINITIONS;
      } else if (name.equals("ABBREVIATIONS")) {
          extension = Extensions.ABBREVIATIONS;
      } else if (name.equals("QUOTES")) {
          extension = Extensions.QUOTES;
      } else if (name.equals("SMARTS")) {
          extension = Extensions.SMARTS;
      } else if (name.equals("SMARTYPANTS")) {
          extension = Extensions.SMARTYPANTS;
      } else if (name.equals("SUPPRESS_ALL_HTML")) {
          extension = Extensions.SUPPRESS_ALL_HTML;
      } else if (name.equals("SUPPRESS_HTML_BLOCKS")) {
          extension = Extensions.SUPPRESS_HTML_BLOCKS;
      } else if (name.equals("SUPPRESS_INLINE_HTML")) {
          extension = Extensions.SUPPRESS_INLINE_HTML;
      } else if (name.equals("TABLES")) {
          extension = Extensions.TABLES;
      } else if (name.equals("WIKILINKS")) {
          extension = Extensions.WIKILINKS;
      } else if (name.equals("ANCHORLINKS")) {
          extension = Extensions.ANCHORLINKS;
      } else if (name.equals("STRIKETHROUGH")) {
          extension = Extensions.STRIKETHROUGH;
      }else if (name.equals("ATXHEADERSPACE")) {
          extension = Extensions.ATXHEADERSPACE;
      }else if (name.equals("FORCELISTITEMPARA")) {
          extension = Extensions.FORCELISTITEMPARA;
      }else if (name.equals("RELAXEDHRULES")) {
          extension = Extensions.RELAXEDHRULES;
      }else if (name.equals("TASKLISTITEMS")) {
          extension = Extensions.TASKLISTITEMS;
      }else if (name.equals("EXTANCHORLINKS")) {
          extension = Extensions.EXTANCHORLINKS;
      } else if (name.equals("ALL")) {
          extension = Extensions.ALL;
      } else if (name.equals("ALL_OPTIONALS")) {
          extension = Extensions.ALL_OPTIONALS;
      } else if (name.equals("ALL_WITH_OPTIONALS")) {
          extension = Extensions.ALL_WITH_OPTIONALS;
      }
      return extension;
  }
 
开发者ID:ghaseminya,项目名称:jbake-rtl-jalaali,代码行数:51,代码来源:MarkdownEngine.java

示例5: NS2GPegDownProcessor

public NS2GPegDownProcessor() {
    super(Extensions.AUTOLINKS | Extensions.SMARTYPANTS | Extensions.STRIKETHROUGH | Extensions.SUPPRESS_ALL_HTML);
}
 
开发者ID:rkfg,项目名称:ns2gather,代码行数:3,代码来源:NS2GPegDownProcessor.java

示例6: parseDescriptionFromMarkdown

private static VBox parseDescriptionFromMarkdown(final String markdown) {

		final VBox result = new VBox();
		final PegDownProcessor processor = new PegDownProcessor(Extensions.STRIKETHROUGH | Extensions.FENCED_CODE_BLOCKS);

		final RootNode rootNode = processor.parseMarkdown(markdown.toCharArray());

		// PanelUtil.visit(rootNode, "");

		final MarkdownVisitor visitor = new MarkdownVisitor();

		visitor.pushNode(result);

		rootNode.accept(visitor);

		result.getStylesheets().add("/styles/markdown.css");
		result.setMaxWidth(200);
		result.layout();

		return result;
	}
 
开发者ID:JanStrauss,项目名称:skadi,代码行数:21,代码来源:PanelUtil.java


注:本文中的org.pegdown.Extensions.STRIKETHROUGH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。