Search in sources :

Example 1 with AsciiDocMarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class AsciiDocLanguageWithConfigurationIntegrationTest method parseWithImagesdirConfiguration.

@Test
public void parseWithImagesdirConfiguration() {
    AsciiDocMarkupLanguageConfiguration configuration = new AsciiDocMarkupLanguageConfiguration();
    Map<String, String> initialAttributes = new HashMap<>();
    initialAttributes.put("imagesdir", "IMGS");
    configuration.setInitialAttributes(initialAttributes);
    MarkupParser parser = createParserWithConfiguration(configuration);
    String markup = "See this the {imagesdir} folder";
    String html = parseAsciiDocToHtml(markup, parser);
    assertEquals("<p>See this the IMGS folder</p>\n", html);
}
Also used : AsciiDocMarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration) HashMap(java.util.HashMap) MarkupParser(org.eclipse.mylyn.wikitext.parser.MarkupParser) Test(org.junit.Test)

Example 2 with AsciiDocMarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class AsciiDocLanguageWithConfigurationIntegrationTest method parseWithEmptyConfiguration.

@Test
public void parseWithEmptyConfiguration() {
    AsciiDocMarkupLanguageConfiguration configuration = new AsciiDocMarkupLanguageConfiguration();
    MarkupParser parser = createParserWithConfiguration(configuration);
    String html = parseAsciiDocToHtml(AsciiDocLanguageAttributeTest.MARKUP_FOR_DEFAULT, parser);
    AsciiDocLanguageAttributeTest.ensureDefaultValues(html);
}
Also used : AsciiDocMarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration) MarkupParser(org.eclipse.mylyn.wikitext.parser.MarkupParser) Test(org.junit.Test)

Aggregations

AsciiDocMarkupLanguageConfiguration (org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration)2 MarkupParser (org.eclipse.mylyn.wikitext.parser.MarkupParser)2 Test (org.junit.Test)2 HashMap (java.util.HashMap)1