Skip to content
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

Merged
merged 1 commit into from Mar 27, 2015

Conversation

kzys
Copy link
Member

@kzys kzys commented Mar 26, 2015

This change makes Scaladoc's HTML valid a bit.

@scala-jenkins scala-jenkins added this to the 2.12.0-M1 milestone Mar 26, 2015
@kzys
Copy link
Member Author

kzys commented Mar 26, 2015

@soc Would you mind if I take the ticket?

@VladUreche Could you take a look?

@VladUreche
Copy link
Member

LGTM, thanks @kzys!

// FIXME: an entity *should* fall into one of the above categories,
// but AnyRef is somehow not
Image.Class
}
Copy link
Member

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
      }

Copy link
Member Author

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.
@soc
Copy link
Member

soc commented Mar 27, 2015

@kzys No, go ahead! Thanks.

VladUreche pushed a commit that referenced this pull request Mar 27, 2015
SI-7601 Scaladoc: img elements must have an "alt" attribute
@VladUreche VladUreche merged commit 8a54e0a into scala:2.12.x Mar 27, 2015
@VladUreche
Copy link
Member

Thanks @kzys!

@lrytz lrytz mentioned this pull request Apr 1, 2015
@lrytz
Copy link
Member

lrytz commented Apr 1, 2015

Should this be back-ported to 2.11.x?

@kzys
Copy link
Member Author

kzys commented Apr 1, 2015

Let me take a look. It must be easy.

@lrytz
Copy link
Member

lrytz commented Apr 2, 2015

Thanks!

kzys added a commit to kzys/scala that referenced this pull request Apr 3, 2015
This change makes Scaladoc's HTML valid a bit.

Backport of scala#4407 to 2.11.x
@adriaanm adriaanm added the 2.12 label Oct 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants