Package org.sweble.wikitext.engine

Examples of org.sweble.wikitext.engine.CompiledPage


  }

  @Override
  public PlainTextMapping filter(String wikiText) {
    try {
      final CompiledPage compiledPage = compiler.postprocess(pageId, wikiText, null);
      final TextConverter textConverter = new TextConverter(config, WRAP_COL);
      final String plainText = (String) textConverter.go(compiledPage.getPage());
      return new PlainTextMapping(plainText, textConverter.getMapping());
    } catch (Exception e) {
      throw new RuntimeException("Could not extract plain text from MediaWiki syntax: " + wikiText, e);
    }
  }
View Full Code Here


  }

  @Override
  public PlainTextMapping filter(String wikiText) {
    try {
      final CompiledPage compiledPage = compiler.postprocess(pageId, wikiText, null);
      final TextConverter textConverter = new TextConverter(config, WRAP_COL);
      textConverter.enableMapping(enableMapping);
      final String plainText = (String) textConverter.go(compiledPage.getPage());
      if (enableMapping) {
        return new PlainTextMapping(plainText, textConverter.getMapping());
      } else {
        return new PlainTextMapping(plainText, null);
      }
View Full Code Here

TOP

Related Classes of org.sweble.wikitext.engine.CompiledPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.