vscode-docthis icon indicating copy to clipboard operation
vscode-docthis copied to clipboard

Line above gets deleted when using extension

Open doitandbedone opened this issue 3 years ago • 0 comments

First of all, thank you SO much for the wonderful extension!

Description: Hello there, there seems to be a rather annoying issue. Whenever you use the extension the line above gets overwritten, if you had something declared, it gets deleted.

Steps to reproduce:

  1. Have two lines of code, for instance:
const someVar: string; // <-- This will be deleted
const someOtherVar: string; // <--Try documenting this
  1. Right click someOtherVar declaration and select "Document This"
  2. Observe the line above (someVar) gets deleted.

Expected result: Line should be respected and stay while documenting the intended line.

Actual: Line above gets deleted:

  /**
   *
   *
   * @type {string}
   */
  var someOtherVar: string; 

Workaround: Easiest thing is to insert a line break in between them and then document. This is rather annoying.

doitandbedone avatar Feb 25 '22 08:02 doitandbedone