borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
558 stars 18 forks source link

JS Commenting prepends extra space #205

Open dennyluan opened 5 years ago

dennyluan commented 5 years ago

Using JS (Babel) comments with the shortcut will insert an extra space to the beginning of lines with text.

cmd + /

Thanks for making this great package!

LeEnno commented 5 years ago

Don't know if this is what @dennyluan was referring to but here is a problem I stumpled upon which might help reproducing the bug.

  1. open new tab
  2. write some JS, i.e. console.log('hey'))
  3. set syntax as JavaScript (Naomi)
  4. use ⌘/ to toggle comment
  5. watch how everything works as expected 👍
  6. now save the file to i.e. test.js
  7. use ⌘/ to toggle comment
  8. watch how each toggle adds an extra space 👎

Heres a gif:

toggle_comment_issue