diff --git a/core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java b/core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java index fd0c96b75..60f59bdc4 100644 --- a/core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java +++ b/core/src/test/java/com/google/googlejavaformat/java/JavadocFormattingTest.java @@ -1847,6 +1847,43 @@ class Test {} doFormatTest(input, expected); } + @Test + public void markdownMoeComments() { + assume().that(MARKDOWN_JAVADOC_SUPPORTED).isTrue(); + String input = + """ + /// This is the first line. + /// + /// + /// This is a comment that should be stripped + /// + /// ``` + /// this is a code block + /// ``` + /// + class Test {} + """ + .replace("moe", "MOE"); + // TODO(kak): Ideally the extra blank lines would not be inserted after the code block + String expected = + """ + /// This is the first line. + /// + /// + /// This is a comment that should be stripped + /// + /// ``` + /// this is a code block + /// ``` + /// + /// + /// + class Test {} + """ + .replace("moe", "MOE"); + doFormatTest(input, expected); + } + @Test public void markdownBackslashes() { assume().that(MARKDOWN_JAVADOC_SUPPORTED).isTrue();