Ensure javadoc fix applies to Android links with anchors
This means is-external=true is removed and target=_top is set on the <a> tag. Without this, javadoc links to framework docs with anchors are currently broken when viewed in the "frame view" on exoplayer.dev/doc/reference/ Before this change: https://developer.android.com/reference/android/media/MediaDrm.html?is-external=true#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap- With this change: https://developer.android.com/reference/android/media/MediaDrm.html#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap- PiperOrigin-RevId: 304136858
This commit is contained in:
parent
41853169a7
commit
45186ac377
@ -15,8 +15,8 @@ ext.fixJavadoc = {
|
||||
def javadocPath = "${project.buildDir}/docs/javadoc"
|
||||
// Fix external Android links to target the top frame.
|
||||
def androidRoot = "https://developer.android.com/reference/"
|
||||
def androidLink = "<a href=\"(${androidRoot}.*?)\\?is-external=true\""
|
||||
def androidFixed = "<a href=\"\\1\" target=\"_top\""
|
||||
def androidLink = "<a href=\"(${androidRoot}.*?)\\?is-external=true(.*)\""
|
||||
def androidFixed = "<a href=\"\\1\\2\" target=\"_top\""
|
||||
ant.replaceregexp(match:androidLink, replace:androidFixed, flags:'g') {
|
||||
fileset(dir: "${javadocPath}", includes: "**/*.html")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user