Use trailing documentation comments properly

Patch by Alexander Zinenko.