Package br.com.caelum.tubaina.chunk

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


  @Override
  public Chunk createChunk(Matcher matcher) {
    int dirNumber = Chapter.getChaptersCount() + Section.getSectionsCount();
    IndexResource resource = new IndexResource(matcher.group(1), dirNumber);
    resources.add(resource);
    return new IndexChunk(matcher.group(1));
  }
View Full Code Here


public class IndexTagTest extends AbstractTagTest {

    @Test
    public void shouldParseIndexTag() throws Exception {
        IndexChunk chunk = new IndexChunk("name");
    String result = getContent(chunk);
        assertEquals("\n\\index{name}\n", result);
    }
View Full Code Here

        assertEquals("\n\\index{name}\n", result);
    }
   
    @Test
    public void shouldEscapeUnderscores() throws Exception {
      IndexChunk chunk = new IndexChunk("index_name_underscore");
        String result = getContent(chunk);
        assertEquals("\n\\index{index\\_name\\_underscore}\n", result);
    }
View Full Code Here

  @Override
  public Chunk createChunk(Matcher matcher) {
    int dirNumber = ChapterBuilder.getChaptersCount() + Section.getSectionsCount();
    IndexResource resource = new IndexResource(matcher.group(1), dirNumber);
    resources.add(resource);
    return new IndexChunk(matcher.group(1));
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.chunk.IndexChunk

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.