if (Strings.isEmptyOrNull(markdownText)) {
return null;
}
final StringWriter writer = new StringWriter();
final Markdown markdown = new Markdown();
try {
markdown.transform(new StringReader(markdownText), writer);
} catch (final ParseException e) {
LOGGER.log(Level.ERROR, "Markdown error", e);
return "Markdown error";
}