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

Disappearing blank line between method and Scaladoc of the next method #99

Closed
sjrd opened this issue Mar 9, 2016 · 1 comment
Closed

Comments

@sjrd
Copy link

sjrd commented Mar 9, 2016

Original:

  /**
   * See [[https://streams.spec.whatwg.org/#reader-cancel §3.4.4.2. cancel(reason)]]
   * of whatwg Streams spec.
   *
   * If the reader is active, the cancel method behaves the same as that for
   * the associated stream. When done, it automatically releases the lock.
   *
   * //todo determine type of reason
   */
  def cancel(reason: Any): js.Promise[Any] = js.native //not actually sure what the return type is here

  /**
   * See [[https://streams.spec.whatwg.org/#reader-read 3.4.4.3. read()]] of
   * whatwg Stream spec.
   *
   * The read method will return a promise that allows access to the next chunk
   * from the stream’s internal queue, if available. If the chunk does become
   * available, the promise will be fulfilled with an object of the form {
   * value: theChunk, done: false }. If the stream becomes closed, the
   * promise will be fulfilled with an object of the form { value: undefined,
   * done: true }. If the stream becomes errored, the promise will be
   * rejected with the relevant error. If reading a chunk causes the queue to
   * become empty, more data will be pulled from the underlying source.
   */
  def read(): js.Promise[Chunk[T]] = js.native

Scalafmt:

  /**
   * See [[https://streams.spec.whatwg.org/#reader-cancel §3.4.4.2. cancel(reason)]]
   * of whatwg Streams spec.
   *
   * If the reader is active, the cancel method behaves the same as that for
   * the associated stream. When done, it automatically releases the lock.
   *
   * //todo determine type of reason
   */
  def cancel(reason: Any): js.Promise[Any] =
    js.native //not actually sure what the return type is here
  /**
   * See [[https://streams.spec.whatwg.org/#reader-read 3.4.4.3. read()]] of
   * whatwg Stream spec.
   *
   * The read method will return a promise that allows access to the next chunk
   * from the stream’s internal queue, if available. If the chunk does become
   * available, the promise will be fulfilled with an object of the form {
   * value: theChunk, done: false }. If the stream becomes closed, the
   * promise will be fulfilled with an object of the form { value: undefined,
   * done: true }. If the stream becomes errored, the promise will be
   * rejected with the relevant error. If reading a chunk causes the queue to
   * become empty, more data will be pulled from the underlying source.
   */
  def read(): js.Promise[Chunk[T]] = js.native

I would like the input to look like this:

  /**
   * See [[https://streams.spec.whatwg.org/#reader-cancel §3.4.4.2. cancel(reason)]]
   * of whatwg Streams spec.
   *
   * If the reader is active, the cancel method behaves the same as that for
   * the associated stream. When done, it automatically releases the lock.
   *
   * //todo determine type of reason
   */
  def cancel(reason: Any): js.Promise[Any] =
    js.native //not actually sure what the return type is here

  /**
   * See [[https://streams.spec.whatwg.org/#reader-read 3.4.4.3. read()]] of
   * whatwg Stream spec.
   *
   * The read method will return a promise that allows access to the next chunk
   * from the stream’s internal queue, if available. If the chunk does become
   * available, the promise will be fulfilled with an object of the form {
   * value: theChunk, done: false }. If the stream becomes closed, the
   * promise will be fulfilled with an object of the form { value: undefined,
   * done: true }. If the stream becomes errored, the promise will be
   * rejected with the relevant error. If reading a chunk causes the queue to
   * become empty, more data will be pulled from the underlying source.
   */
  def read(): js.Promise[Chunk[T]] = js.native

Using

  • 0.1.1
  • default
@sjrd
Copy link
Author

sjrd commented Mar 9, 2016

This is probably as special-case of #102.

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