Skip to content

Commit

Permalink
Support Python **kwargs, see #96
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirse committed Aug 23, 2017
1 parent c8a5622 commit fc1185c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This project tries to adhere to [Semantic Versioning](http://semver.org/).
### Added
- Polish translation, thanks to [__@MajkelKorczak__](https://github.com/MajkelKorczak)

### Fixed
- Support Python `**kwargs` (see [#96](https://github.com/Hirse/brackets-outline-list/issues/96))


## 1.2.0 - 2017-04-24
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/languages/Python.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ define(function Python(require, exports, module) {
*/
function getOutlineList(text) {
var lines = text.split("\n");
var regex = /^([ \t]*)(class|def) +(\w+) *(\([\w, =]*\))?:$/g;
var regex = /^([ \t]*)(class|def) +(\w+) *(\([\w, =*]*\))?:$/g;
var result = [];
lines.forEach(function (line, index) {
var match = regex.exec(line);
Expand Down
2 changes: 2 additions & 0 deletions test/example/python/kwargs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def whoami(**kwargs):
pass

0 comments on commit fc1185c

Please sign in to comment.