@Test public void a_line_with_5_spaces_and_Xfunction_test_is_NOT_recognized() throws Exception { AsciiDoctorScriptModel asciidoctorScriptModel = builderToTest.build(" Xfunction test {}"); assertThat(asciidoctorScriptModel).hasNoHeadlines(); }
public AsciiDoctorScriptModel build(String asciidoctorScript) throws AsciiDoctorScriptModelException { AsciiDoctorScriptModel model = new AsciiDoctorScriptModel(); Collection<AsciiDoctorHeadline> headlines = headlineParser.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> includes = INCLUDE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> images = IMAGE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> plantuml = PLANTUML_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> ditaa = DITAA_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorInlineAnchor> inlineAnchors = inlineAnchorParser.parse(asciidoctorScript); model.getHeadlines().addAll(headlines); model.getIncludes().addAll(includes); model.getInlineAnchors().addAll(inlineAnchors); model.getImages().addAll(images); model.getDiagrams().addAll(plantuml); model.getDiagrams().addAll(ditaa); handleHeadlinesWithAnchorsBefore(model); handleHeadlinesWithSameCalculatedIdsWhereNoIdSet(model); return model; }
AsciiDoctorScriptModelBuilder { public AsciiDoctorScriptModel build(String asciidoctorScript) throws AsciiDoctorScriptModelException { AsciiDoctorScriptModel model = new AsciiDoctorScriptModel(); Collection<AsciiDoctorHeadline> headlines = headlineParser.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> includes = INCLUDE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> images = IMAGE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> plantuml = PLANTUML_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> ditaa = DITAA_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorInlineAnchor> inlineAnchors = inlineAnchorParser.parse(asciidoctorScript); model.getHeadlines().addAll(headlines); model.getIncludes().addAll(includes); model.getInlineAnchors().addAll(inlineAnchors); model.getImages().addAll(images); model.getDiagrams().addAll(plantuml); model.getDiagrams().addAll(ditaa); handleHeadlinesWithAnchorsBefore(model); handleHeadlinesWithSameCalculatedIdsWhereNoIdSet(model); return model; } }
AsciiDoctorScriptModelBuilder { public AsciiDoctorScriptModel build(String asciidoctorScript) throws AsciiDoctorScriptModelException { AsciiDoctorScriptModel model = new AsciiDoctorScriptModel(); Collection<AsciiDoctorHeadline> headlines = headlineParser.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> includes = INCLUDE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> images = IMAGE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> plantuml = PLANTUML_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> ditaa = DITAA_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorInlineAnchor> inlineAnchors = inlineAnchorParser.parse(asciidoctorScript); model.getHeadlines().addAll(headlines); model.getIncludes().addAll(includes); model.getInlineAnchors().addAll(inlineAnchors); model.getImages().addAll(images); model.getDiagrams().addAll(plantuml); model.getDiagrams().addAll(ditaa); handleHeadlinesWithAnchorsBefore(model); handleHeadlinesWithSameCalculatedIdsWhereNoIdSet(model); return model; }  }
AsciiDoctorScriptModelBuilder { public AsciiDoctorScriptModel build(String asciidoctorScript) throws AsciiDoctorScriptModelException { AsciiDoctorScriptModel model = new AsciiDoctorScriptModel(); Collection<AsciiDoctorHeadline> headlines = headlineParser.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> includes = INCLUDE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> images = IMAGE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> plantuml = PLANTUML_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> ditaa = DITAA_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorInlineAnchor> inlineAnchors = inlineAnchorParser.parse(asciidoctorScript); model.getHeadlines().addAll(headlines); model.getIncludes().addAll(includes); model.getInlineAnchors().addAll(inlineAnchors); model.getImages().addAll(images); model.getDiagrams().addAll(plantuml); model.getDiagrams().addAll(ditaa); handleHeadlinesWithAnchorsBefore(model); handleHeadlinesWithSameCalculatedIdsWhereNoIdSet(model); return model; }  AsciiDoctorScriptModel build(String asciidoctorScript); }
AsciiDoctorScriptModelBuilder { public AsciiDoctorScriptModel build(String asciidoctorScript) throws AsciiDoctorScriptModelException { AsciiDoctorScriptModel model = new AsciiDoctorScriptModel(); Collection<AsciiDoctorHeadline> headlines = headlineParser.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> includes = INCLUDE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> images = IMAGE_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> plantuml = PLANTUML_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorFileReference> ditaa = DITAA_PARSER.parse(asciidoctorScript); Collection<AsciiDoctorInlineAnchor> inlineAnchors = inlineAnchorParser.parse(asciidoctorScript); model.getHeadlines().addAll(headlines); model.getIncludes().addAll(includes); model.getInlineAnchors().addAll(inlineAnchors); model.getImages().addAll(images); model.getDiagrams().addAll(plantuml); model.getDiagrams().addAll(ditaa); handleHeadlinesWithAnchorsBefore(model); handleHeadlinesWithSameCalculatedIdsWhereNoIdSet(model); return model; }  AsciiDoctorScriptModel build(String asciidoctorScript);  }