io.qameta.allure.context.MarkdownContext Maven / Gradle / Ivy
package io.qameta.allure.context;
import com.vladsch.flexmark.html.HtmlRenderer;
import com.vladsch.flexmark.parser.Parser;
import io.qameta.allure.Context;
import java.util.function.Function;
/**
* Markdown context. Can be used to process markdown files to html.
*
* @since 2.0
*/
public class MarkdownContext implements Context> {
@Override
public Function getValue() {
Parser parser = Parser.builder().build();
HtmlRenderer renderer = HtmlRenderer.builder().build();
return s -> renderer.render(parser.parse(s));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy