soutaro / rbs-inline

Inline RBS type declaration
MIT License
231 stars 7 forks source link

Revise comment line grouping #58

Closed soutaro closed 3 months ago

soutaro commented 3 months ago

This PR fixes comment lines grouping to allow inserting empty lines inside @rbs or @rbs! annotation.

# @rbs!
#   type foo = Integer
#
#   type bar = String

The @rbs! annotation above didn't work well before this patch, because the third line is empty and the line has 0 leading spaces which resulted in leaving from the @rbs! parsing.

This PR allows continuing the parsing of @rbs! and @rbs annotation with an empty line. The #:: and #[ annotation cannot continue after an empty line.