ehuss/Sublime-Wrap-Plus

Exception when run from the first line in a block comment

Opened this issue · 2 comments

With a comment as follows (and empty file), running wrap plus from the first comment line results in an exception. (Syntax: C or Stylus)

/* first line
 * comment
 */
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3 Portable Beta\sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "wrap_plus in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Wrap Plus.sublime-package", line 609, in run
  File "wrap_plus in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Wrap Plus.sublime-package", line 343, in _find_paragraphs
  File "wrap_plus in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Wrap Plus.sublime-package", line 275, in _find_paragraph_start
  File "wrap_plus in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Wrap Plus.sublime-package", line 252, in _is_paragraph_break
  File "wrap_plus in C:\Program Files\Sublime Text 3 Portable Beta\Data\Installed Packages\Wrap Plus.sublime-package", line 263, in _is_blank_line
TypeError: expected string or buffer

Confirmed. Although, I believe the standard comment block is like this, with a blank first line:

/**
 * Example
 **/

It was just an example for reproduction, but I can confirm that it also happens if the comment is like yours.