diff --git a/CHANGES.rst b/CHANGES.rst index aac0a1c..5d465e2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,16 @@ +Version 0.1.5 +------------- +Released on Nov 18th 2017 + +- Fix bug + + - Invalid space after {{_header_}} + - Document's custom template section was wrong + + see https://github.com/heavenshell/vim-pydocstring/issues/34 + + Thx @themightyoarfish + Version 0.1.4 ------------- Released on Sep 10th 2017 diff --git a/autoload/pydocstring.vim b/autoload/pydocstring.vim index 3d48a75..891ccb9 100644 --- a/autoload/pydocstring.vim +++ b/autoload/pydocstring.vim @@ -1,6 +1,6 @@ " Insert Docstring. " Author: Shinya Ohyanagi -" Version: 0.1.4 +" Version: 0.1.5 " WebPage: http://github.com/heavenshell/vim-pydocstriong/ " Description: Generate Python docstring to your Python script file. " License: BSD, see LICENSE for more details. @@ -157,7 +157,6 @@ function! s:builddocstring(strs, indent, nested_indent) if line =~ '{{_header_}}' let header = substitute(line, '{{_header_}}', prefix, '') call add(docstrings, a:indent . header) - call add(docstrings, '') elseif line =~ '{{_args_}}' if len(args) != 0 for arg in args diff --git a/doc/pydocstring.txt b/doc/pydocstring.txt index b5be9a8..2c86260 100644 --- a/doc/pydocstring.txt +++ b/doc/pydocstring.txt @@ -1,6 +1,6 @@ *pydocstring.txt* Generate Python docstring to your Python code. -Version: 0.1.4 +Version: 0.1.5 Author: Shinya Ohynagi Repository: http://github.com/heavenshell/vim-pydocstring/ License: BSD, see LICENSE for more details. @@ -191,7 +191,7 @@ Numpy style docstring template example. > """{{_header_}} - {{_arg_}} :{{_lf_}}{{_indent_}} {{_arg_}} is + {{_args_}} :{{_lf_}}{{_indent_}} {{_args_}} is """ < Set cursor on `def arg1` line and type following. @@ -217,7 +217,7 @@ Nested indent example. """{{_header_}} {{_indent_}}Args: - {{_nested_indent_}}{{_arg_}}: + {{_nested_indent_}}{{_args_}}: """ < Set cursor on `def arg1` line and type following. diff --git a/ftplugin/python/pydocstring.vim b/ftplugin/python/pydocstring.vim index 58ec0b8..5fc8043 100644 --- a/ftplugin/python/pydocstring.vim +++ b/ftplugin/python/pydocstring.vim @@ -1,6 +1,6 @@ " File: pydocstring.vim " Author: Shinya Ohyanagi -" Version: 0.1.4 +" Version: 0.1.5 " WebPage: http://github.com/heavenshell/vim-pydocstriong/ " Description: Generate Python docstring to your Python script file. " License: BSD, see LICENSE for more details. diff --git a/template/pydocstring/multi.txt b/template/pydocstring/multi.txt index 86a1e80..89235d2 100644 --- a/template/pydocstring/multi.txt +++ b/template/pydocstring/multi.txt @@ -1,4 +1,5 @@ """{{_header_}} + :param {{_args_}}: :rtype: {{_returnType_}} """ diff --git a/test/templates/custom-templates/multi.txt b/test/templates/custom-templates/multi.txt index 80ac255..7899447 100644 --- a/test/templates/custom-templates/multi.txt +++ b/test/templates/custom-templates/multi.txt @@ -1,4 +1,5 @@ """{{_header_}} + {{_args_}}:{{_lf_}}{{_indent_}} the ... return ({{_returnType_}}): """ diff --git a/test/templates/issue19/multi.txt b/test/templates/issue19/multi.txt index 0a027c5..c594cd4 100644 --- a/test/templates/issue19/multi.txt +++ b/test/templates/issue19/multi.txt @@ -1,5 +1,6 @@ ''' {{_header_}} + {{_indent_}}Args: {{_nested_indent_}}{{_args_}}: ''' diff --git a/test/templates/numpy/multi.txt b/test/templates/numpy/multi.txt index f12e573..be6f10b 100644 --- a/test/templates/numpy/multi.txt +++ b/test/templates/numpy/multi.txt @@ -1,4 +1,5 @@ """{{_header_}} + {{_indent_}}Parameters {{_indent_}}----------