Skip to content

Commit 5204dd4

Browse files
authored
Fix broken code elements in docs (#4292)
* Fix code blocks * Fix linting in firebase-database * Fix FirebaseMLDownloader linting
1 parent 00d8c72 commit 5204dd4

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

firebase-database/src/main/java/com/google/firebase/database/DataSnapshot.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public Object getValue(boolean useExportFormat) {
166166
*
167167
* An example class might look like:
168168
*
169-
* <pre><code>
169+
* <pre>
170170
* class Message {
171171
* private String author;
172172
* private String text;
@@ -190,7 +190,7 @@ public Object getValue(boolean useExportFormat) {
190190
*
191191
* // Later
192192
* Message m = snapshot.getValue(Message.class);
193-
* </code></pre>
193+
* </pre>
194194
*
195195
* @param valueType The class into which this snapshot should be marshalled
196196
* @param <T> The type to return. Implicitly defined from the class passed in
@@ -208,10 +208,10 @@ public <T> T getValue(@NonNull Class<T> valueType) {
208208
* properly-typed Collection. So, in the case where you want a {@link java.util.List} of Message
209209
* instances, you will need to do something like the following:
210210
*
211-
* <pre><code>
211+
* <pre>
212212
* GenericTypeIndicator&lt;List&lt;Message&gt;&gt; t = new GenericTypeIndicator&lt;List&lt;Message&gt;&gt;() {};
213213
* List&lt;Message&gt; messages = snapshot.getValue(t);
214-
* </code></pre>
214+
* </pre>
215215
*
216216
* It is important to use a subclass of {@link GenericTypeIndicator}. See {@link
217217
* GenericTypeIndicator} for more details
@@ -255,11 +255,13 @@ public String getKey() {
255255

256256
/**
257257
* Gives access to all of the immediate children of this snapshot. Can be used in native for
258-
* loops: <code>
259-
* <br> for (DataSnapshot child : parent.getChildren()) {
260-
* <br> &nbsp;&nbsp;&nbsp;&nbsp;...
261-
* <br> }
262-
* </code>
258+
* loops:
259+
*
260+
* <pre>
261+
* for (DataSnapshot child : parent.getChildren()) {
262+
* &nbsp;&nbsp;&nbsp;&nbsp;...
263+
* }
264+
* </pre>
263265
*
264266
* @return The immediate children of this snapshot
265267
*/

firebase-database/src/main/java/com/google/firebase/database/GenericTypeIndicator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* {@link DataSnapshot}: <br>
2626
* <br>
2727
*
28-
* <pre><code>
28+
* <pre>
2929
* class Message {
3030
* private String author;
3131
* private String text;
@@ -51,7 +51,7 @@
5151
* GenericTypeIndicator&lt;List&lt;Message&gt;&gt; t = new GenericTypeIndicator&lt;List&lt;Message&gt;&gt;() {};
5252
* List&lt;Message&gt; messages = snapshot.getValue(t);
5353
*
54-
* </code></pre>
54+
* </pre>
5555
*
5656
* @param <T> The type of generic collection that this instance servers as an indicator for
5757
*/

firebase-database/src/main/java/com/google/firebase/database/MutableData.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ public long getChildrenCount() {
9191
}
9292

9393
/**
94-
* Used to iterate over the immediate children at this location <code>
95-
* <br>for (MutableData child : parent.getChildren()) {
96-
* <br>&nbsp;&nbsp;&nbsp;&nbsp;...
97-
* <br>}
98-
* </code>
94+
* Used to iterate over the immediate children at this location
95+
*
96+
* <pre>
97+
* for (MutableData child : parent.getChildren()) {
98+
* &nbsp;&nbsp;&nbsp;&nbsp;...
99+
* }
100+
* </pre>
99101
*
100102
* @return The immediate children at this location
101103
*/
@@ -196,7 +198,7 @@ public Object getValue() {
196198
*
197199
* An example class might look like:
198200
*
199-
* <pre><code>
201+
* <pre>
200202
* class Message {
201203
* private String author;
202204
* private String text;
@@ -220,7 +222,7 @@ public Object getValue() {
220222
*
221223
* // Later
222224
* Message m = mutableData.getValue(Message.class);
223-
* </code></pre>
225+
* </pre>
224226
*
225227
* @param valueType The class into which this data in this instance should be marshalled
226228
* @param <T> The type to return. Implicitly defined from the class passed in
@@ -238,11 +240,11 @@ public <T> T getValue(@NonNull Class<T> valueType) {
238240
* properly-typed Collection. So, in the case where you want a {@link java.util.List} of Message
239241
* instances, you will need to do something like the following:
240242
*
241-
* <pre><code>
243+
* <pre>
242244
* GenericTypeIndicator&lt;List&lt;Message&gt;&gt; t =
243245
* new GenericTypeIndicator&lt;List&lt;Message&gt;&gt;() {};
244246
* List&lt;Message&gt; messages = mutableData.getValue(t);
245-
* </code></pre>
247+
* </pre>
246248
*
247249
* It is important to use a subclass of {@link GenericTypeIndicator}. See {@link
248250
* GenericTypeIndicator} for more details

0 commit comments

Comments
 (0)