Search in sources :

Example 1 with MarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class TextileLanguageTest method testDoubleQuotationsGerman.

@Test
public void testDoubleQuotationsGerman() throws IOException {
    MarkupLanguageConfiguration configuration = new MarkupLanguageConfiguration();
    configuration.setLocale(Locale.GERMAN);
    parser.getMarkupLanguage().configure(configuration);
    String html = parser.parseToHtml("some \"thing is\" quoted");
    assertTrue(html.contains("some „thing is” quoted"));
}
Also used : MarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration) Test(org.junit.Test) AbstractMarkupGenerationTest(org.eclipse.mylyn.wikitext.toolkit.AbstractMarkupGenerationTest)

Example 2 with MarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class MarkupTaskEditorExtension method createRepositoryMarkupLanguage.

@SuppressWarnings("unchecked")
private MarkupLanguageType createRepositoryMarkupLanguage(TaskRepository taskRepository) {
    MarkupLanguageType copy = (MarkupLanguageType) markupLanguage.clone();
    MarkupLanguageConfiguration configuration = createMarkupLanguageConfiguration(taskRepository);
    copy.configure(configuration);
    return copy;
}
Also used : MarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration)

Example 3 with MarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class TextileLanguageTasksTest method initParser.

private void initParser() throws IOException {
    parser = new MarkupParser();
    markupLanguage = new TextileLanguage();
    MarkupLanguageConfiguration configuration = Util.create("bugzilla");
    markupLanguage.configure(configuration);
    parser.setMarkupLanguage(markupLanguage);
}
Also used : MarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration) MarkupParser(org.eclipse.mylyn.wikitext.parser.MarkupParser)

Example 4 with MarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class AsciiDocLanguageWithConfigurationIntegrationTest method parseWithCommonMarkupLanguageConfiguration.

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

Example 5 with MarkupLanguageConfiguration

use of org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration in project mylyn.docs by eclipse.

the class TracWikiLanguageTest method testWikiWordDisabled.

public void testWikiWordDisabled() {
    MarkupLanguageConfiguration configuration = new MarkupLanguageConfiguration();
    configuration.setWikiWordLinking(false);
    markupLanguage.configure(configuration);
    markupLanguage.setInternalLinkPattern("https://foo.bar/wiki/{0}");
    String html = parser.parseToHtml("A WikiWord points somewhere");
    assertTrue(html.contains("<body><p>A WikiWord points somewhere</p></body>"));
}
Also used : MarkupLanguageConfiguration(org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration)

Aggregations

MarkupLanguageConfiguration (org.eclipse.mylyn.wikitext.parser.markup.MarkupLanguageConfiguration)9 MarkupParser (org.eclipse.mylyn.wikitext.parser.MarkupParser)3 Test (org.junit.Test)2 AsciiDocMarkupLanguageConfiguration (org.eclipse.mylyn.wikitext.asciidoc.AsciiDocMarkupLanguageConfiguration)1 AbstractMarkupGenerationTest (org.eclipse.mylyn.wikitext.toolkit.AbstractMarkupGenerationTest)1