Examples of GistChunk


Examples of br.com.caelum.tubaina.chunk.GistChunk

    String options = "417835";
    @SuppressWarnings("unused")
    // code to be retrieved, we can only assert parts of it
    String gistedCode = "javascript:(function() {window.frames[3][0].document.getElementById('frameplugin').style.display='none'})()";

    GistChunk chunk = new GistChunk(options);
    String output = new GistTag(new SimpleIndentator(4), retriever).parse(chunk);

    assertPygmentsRan(output);
    assertTrue(output.contains("javascript"));
    assertTrue(output.contains("function"));
View Full Code Here

Examples of br.com.caelum.tubaina.chunk.GistChunk

    GistConnector connector = new GistConnector(new JsonToGistResultConverter(), mockedGistRequest);

    GistResultRetriever retriever = new GistResultRetriever(connector);

    GistChunk chunk = new GistChunk(options);
    String output = new GistTag(new SimpleIndentator(4), retriever).parse(chunk);

    assertPygmentsRan(output);
    assertTrue(output.contains("GivenCode"));
  }
View Full Code Here

Examples of br.com.caelum.tubaina.chunk.GistChunk

    super("(?s)(?i)\\A\\s*\\[gist \\s*(.*?)\\s*\\]");
  }

  @Override
  public Chunk createChunk(Matcher matcher) {
    return new GistChunk(matcher.group(1));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.