Skip to content

Commit 820e6e0

Browse files
JimClarke5rnett
authored andcommitted
Reformat code.
Fix oddities from TF Python like @compatibility, @end_compatibility, @tf.xxxxx Signed-off-by: Ryan Nett <[email protected]>
1 parent 70581d4 commit 820e6e0

File tree

1 file changed

+5
-3
lines changed
  • tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/op/generator/javadoc

1 file changed

+5
-3
lines changed

tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/op/generator/javadoc/JavaDocWriter.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@ protected void append(String s) {
7474

7575
private String escapeHtml(String s) {
7676
s = Escaping.escapeHtml(s);
77+
// handle oddities from tensorflow python markup that don't work well in JavaDoc.
7778
if (s.contains("@compatibility")) {
7879
s = s.replace("@", "{@literal @}") + "<br>";
7980
} else if (s.contains("@end_compatibility")) {
8081
s = "<br>" + s.replace("@", "{@literal @}");
82+
} else if (s.contains("@tf.")) {
83+
s = s.replace("@", "{@literal @}");
84+
} else if (s.contains("<bytes>")) {
85+
s = s.replace("<bytes>", "%lt;bytes&gt;");
8186
}
8287
return s;
83-
8488
}
85-
86-
8789
}

0 commit comments

Comments
 (0)