Skip to content

Commit

Permalink
Do not set doc_type null as default
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Mar 23, 2024
1 parent 7e329fb commit f970365
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,17 @@ private void convertTag(JavadocParser.Tag tag, StringBuilder buffer) {
* end line (e.g., `"\n "`), which gets left behind by the Javadoc
* processor.
*
* @param input AsciiDoc source
* @param input AsciiDoc source
* @param inline true to set doc_type to inline, null otherwise
* @return content rendered by Asciidoctor
*/
private String convert(String input, boolean inline) {
if (input.trim().isEmpty()) {
return "";
}
options.setDocType(inline ? INLINE_DOCTYPE : null);
if (inline) {
options.setDocType(INLINE_DOCTYPE);
}
return asciidoctor.convert(cleanJavadocInput(input), options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/
public class AsciidoctorConverterTest {

// Asciidoctorj < v2.5.12 used OS linebreaks instead of simply \n
private static final String LINEBREAK = "\r?\n";

private AsciidoctorConverter converter;
Expand Down

0 comments on commit f970365

Please sign in to comment.