Skip to content

SI-7601 Scaladoc: img elements must have an "alt" attribute#4407

Merged
VladUreche merged 1 commit intoscala:2.12.xfrom
kzys:7601-img-alt
Mar 27, 2015
Merged

SI-7601 Scaladoc: img elements must have an "alt" attribute#4407
VladUreche merged 1 commit intoscala:2.12.xfrom
kzys:7601-img-alt

Conversation

@kzys
Copy link
Contributor

@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
Contributor Author

kzys commented Mar 26, 2015

@soc Would you mind if I take the ticket?

@VladUreche Could you take a look?

@VladUreche
Copy link
Contributor

LGTM, thanks @kzys!

Copy link
Contributor

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
Contributor 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
Contributor

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
Contributor

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
Contributor 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

Development

Successfully merging this pull request may close these issues.

6 participants