New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SI-7601 Scaladoc: img elements must have an "alt" attribute #4407
Conversation
@soc Would you mind if I take the ticket? @VladUreche Could you take a look? |
LGTM, thanks @kzys! |
// FIXME: an entity *should* fall into one of the above categories, | ||
// but AnyRef is somehow not | ||
Image.Class | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A purely style-related problem, but wouldn't it be easier to have:
def entityToImage(e: DocTemplateEntity) =
if (e.isTrait) Image.Trait
else if (e.isClass) Image.Class
else if (e.isAbstractType) Image.Type
else if (e.isAliasType) Image.Type
else if (e.isObject) Image.Object
else if (e.isPackage) Image.Package
else {
// FIXME: an entity *should* fall into one of the above categories,
// but AnyRef is somehow not
debuglog(s"No matching image for entity $e.")
Image.Class
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense since we don't have a long expr inside if anymore. I won't add the debuglog since there is no debuglog here and referencing AnyRef is inevitable.
This change makes Scaladoc's HTML valid a bit.
@kzys No, go ahead! Thanks. |
SI-7601 Scaladoc: img elements must have an "alt" attribute
Thanks @kzys! |
Should this be back-ported to 2.11.x? |
Let me take a look. It must be easy. |
Thanks! |
This change makes Scaladoc's HTML valid a bit. Backport of scala#4407 to 2.11.x
This change makes Scaladoc's HTML valid a bit.