Skip to content

Commit

Permalink
Release 1.3.1 python float params
Browse files Browse the repository at this point in the history
see #97
  • Loading branch information
Hirse committed Aug 25, 2017
1 parent e6c7473 commit 6f90f96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
This project tries to adhere to [Semantic Versioning](http://semver.org/).


## 1.3.1 - 2017-08-25
### Fixed
- Support Python default parameter floats (see [#97](https://github.com/Hirse/brackets-outline-list/issues/97))


## 1.3.0 - 2017-08-23
### Added
- Polish translation, thanks to [__@MajkelKorczak__](https://github.com/MajkelKorczak)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hirse.outline-list",
"version": "1.3.0",
"version": "1.3.1",
"title": "Brackets Outline List",
"description": "Displays a list of the functions or definitions in the currently opened document. Works with CSS, CoffeeScript, HTML, Haxe, Jade, JavaScript, JSX, LESS, Markdown, PHP, Python, Ruby, SCSS, SVG, Stylus, and XML.",
"engines": {
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
7 changes: 5 additions & 2 deletions test/example/python/defaultParameters.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
def whoami(dummy=0):
def default(dummy=0):
pass

def whoami(dummy = 0):
def defaultWithSpaces(dummy = 0):
pass

def defaultFloat(dummy=0.1):
pass

0 comments on commit 6f90f96

Please sign in to comment.