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

Comments disappear #37

Closed
AlanFoster opened this issue Feb 5, 2019 · 2 comments
Closed

Comments disappear #37

AlanFoster opened this issue Feb 5, 2019 · 2 comments

Comments

@AlanFoster
Copy link
Contributor

AlanFoster commented Feb 5, 2019

Input file

# frozen_string_literal: true

module Foo
  # Hello
  # world
  # comments
  # disappear
  #
  def foo
  end
end

Current output file

The comments attached to foo disappear

# frozen_string_literal: true

module Foo
  #

  def foo; end
end

Expected output file

# frozen_string_literal: true

module Foo
  # Hello
  # world
  # comments
  # disappear
  #
  def foo; end
end
@AlanFoster
Copy link
Contributor Author

Hm, poking a bit further - the comments don't "disappear" - but it seems to choose the latest line instead:

Input file

# frozen_string_literal: true

module Foo
  # Hello
  # world
  # comments
  # last line only shows
  def foo
  end
end

Current output file

The comments attached to foo disappear

# frozen_string_literal: true

module Foo
  # last line only shows

  def foo; end
end

Expected output file

# frozen_string_literal: true

module Foo
  # Hello
  # world
  # comments
  # last line only shows
  def foo
  end
end

@kddnewton
Copy link
Member

This should now be fixed in v0.2.0.

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

No branches or pull requests

2 participants