playframework / twirl

Twirl is Play's default template engine
Apache License 2.0
545 stars 108 forks source link

Not possible to add scaladoc comment for the generated template object #420

Open ianknowles opened 3 years ago

ianknowles commented 3 years ago

Adding a scaladoc comment to the start of a template file like the example from the documentation:

@*************************************
 * Home page.                        *
 *                                   *
 * @param msg The message to display *
 *************************************@
@()

generates a scaladoc comment for the apply method of the template. This is correct and expected but it means its not possible to comment on the object.

Given the standard scaladoc formatting an object comment is the best place to document a more complex template, the method comment just doesn't give room for or expect lengthy comments.

mkurz commented 3 years ago

@ianknowles If you want to provide a pull request, we are happy to review it :wink: