@Test void generateWithNull() { assertThrows(IllegalArgumentException.class, () -> markup.convertAsHtml(null)); }
@Override public String convertAsHtml(String markupString) { if (markupString == null) throw new IllegalArgumentException("Can not convert " + getName() + " to HTML : the String is null"); final Parser parser = Parser.builder().extensions(extensions).build(); final Node node = parser.parse(markupString); final HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build(); return renderer.render(node).trim(); }
MarkdownMarkup extends AbstractMarkup { @Override public String convertAsHtml(String markupString) { if (markupString == null) throw new IllegalArgumentException("Can not convert " + getName() + " to HTML : the String is null"); final Parser parser = Parser.builder().extensions(extensions).build(); final Node node = parser.parse(markupString); final HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build(); return renderer.render(node).trim(); } }
MarkdownMarkup extends AbstractMarkup { @Override public String convertAsHtml(String markupString) { if (markupString == null) throw new IllegalArgumentException("Can not convert " + getName() + " to HTML : the String is null"); final Parser parser = Parser.builder().extensions(extensions).build(); final Node node = parser.parse(markupString); final HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build(); return renderer.render(node).trim(); } MarkdownMarkup(); }
MarkdownMarkup extends AbstractMarkup { @Override public String convertAsHtml(String markupString) { if (markupString == null) throw new IllegalArgumentException("Can not convert " + getName() + " to HTML : the String is null"); final Parser parser = Parser.builder().extensions(extensions).build(); final Node node = parser.parse(markupString); final HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build(); return renderer.render(node).trim(); } MarkdownMarkup(); @Override String convertAsHtml(String markupString); }
MarkdownMarkup extends AbstractMarkup { @Override public String convertAsHtml(String markupString) { if (markupString == null) throw new IllegalArgumentException("Can not convert " + getName() + " to HTML : the String is null"); final Parser parser = Parser.builder().extensions(extensions).build(); final Node node = parser.parse(markupString); final HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build(); return renderer.render(node).trim(); } MarkdownMarkup(); @Override String convertAsHtml(String markupString);  }