Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These tags currently receive no special handling, which causes line breaks inside multi-line <code> blocks to be lost. The blocks need to be wrapped in <pre>s to render correctly, but the formatter should still avoid mangling whitespace. Also, only recognize 'footer' javadoc tags that start with a lowercase letter. This includes all supported javadoc tags, and excludes unescaped annotations inside code blocks (which are currently formatted as if they were tags). MOE_MIGRATED_REVID=127962506
- Loading branch information
Showing
7 changed files
with
129 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ class B29618429 { | |
* Hello | ||
* | ||
* <p>World | ||
* | ||
* <pre> | ||
* @LooksLikeATag( | ||
* foo = "bar" | ||
|
45 changes: 45 additions & 0 deletions
45
core/src/test/resources/com/google/googlejavaformat/java/testdata/B30223986.input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Base class for {@link Foo}. | ||
* | ||
* <p>The subclass should implement {@link #bar()}, with the implementation returning a | ||
* new instance of the foo relevant to that baz. | ||
* | ||
* Example: | ||
* <code> | ||
* @Override | ||
* protected Foo bar() { | ||
* return new Foo(); | ||
* } | ||
* </code> | ||
* | ||
* The subclass should call {@link #get()} to get the foo object, | ||
* and should not cache it in the subclass. | ||
* Example: | ||
* <code> | ||
* @Annotation("something") | ||
* public void thing() { | ||
* } | ||
* </code> | ||
* | ||
* @param <T> concrete subclass | ||
*/ | ||
class Test { | ||
/** | ||
* Field | ||
* | ||
* Example: | ||
* <pre><code> | ||
* @Annotation("something") | ||
* public void thing() { | ||
* } | ||
* </code></pre> | ||
* | ||
* @param asd | ||
*/ | ||
int x() {} | ||
|
||
/** | ||
* Inline <code>foo</code>. | ||
*/ | ||
int y() {} | ||
} |
39 changes: 39 additions & 0 deletions
39
core/src/test/resources/com/google/googlejavaformat/java/testdata/B30223986.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Base class for {@link Foo}. | ||
* | ||
* <p>The subclass should implement {@link #bar()}, with the implementation returning a new instance | ||
* of the foo relevant to that baz. | ||
* | ||
* <p>Example: <code> | ||
* @Override | ||
* protected Foo bar() { | ||
* return new Foo(); | ||
* } | ||
* </code> The subclass should call {@link #get()} to get the foo object, and should not cache it in | ||
* the subclass. Example: <code> | ||
* @Annotation("something") | ||
* public void thing() { | ||
* } | ||
* </code> | ||
* | ||
* @param <T> concrete subclass | ||
*/ | ||
class Test { | ||
/** | ||
* Field | ||
* | ||
* <p>Example: | ||
* | ||
* <pre><code> | ||
* @Annotation("something") | ||
* public void thing() { | ||
* } | ||
* </code></pre> | ||
* | ||
* @param asd | ||
*/ | ||
int x() {} | ||
|
||
/** Inline <code>foo</code>. */ | ||
int y() {} | ||
} |