Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownuser88 committed Apr 5, 2017
2 parents e231331 + cf74d8a commit fd01979
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ you can find that functionality in context menu (right click) or Command Palette

| Javascript |
| ---------- |
| ![Javascript](https://github.com/unknownuser88/consolewrap/raw/master/images/js.gif) |
| ![Javascript](https://github.com/unknownuser88/consolewrap/raw/demo/images/js.gif) |

| Python |
| ------ |
| ![Python](https://github.com/unknownuser88/consolewrap/raw/master/images/py.gif) |
| ![Python](https://github.com/unknownuser88/consolewrap/raw/demo/images/py.gif) |

| Php |
| --- |
| ![Php](https://github.com/unknownuser88/consolewrap/raw/master/images/php.gif) |
| ![Php](https://github.com/unknownuser88/consolewrap/raw/demo/images/php.gif) |

| All Logs |
| -------- |
| ![All Logs](https://github.com/unknownuser88/consolewrap/raw/master/images/list.gif) |
| ![All Logs](https://github.com/unknownuser88/consolewrap/raw/demo/images/list.gif) |


## Key Binding
Expand Down
8 changes: 4 additions & 4 deletions core/php_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ def comment(self, view, edit, cursor):
cursor = view.sel()[0]
line_region = view.line(cursor)
string = view.substr(line_region)
matches = re.finditer(r"^((?!\/\/\s?))(echo '<pre>';\s?)?(.+)?("+logFunc+")(\.?)(\w+)?\((.+)?\);( echo '<\/pre>';)?", string, re.MULTILINE)

for match in matches:
string = string.replace(match.group(0), "// "+match.group(0))
rgx = re.compile('^[ \t]*((echo|'+logFunc+').*;)', re.MULTILINE)
for line in rgx.finditer(string):
# print(line.group(1))
string = string.replace(line.group(1), "// "+line.group(1))

view.replace(edit, line_region, string)
view.sel().clear()
Expand Down
Binary file removed images/js.gif
Binary file not shown.
Binary file removed images/list.gif
Binary file not shown.
Binary file removed images/php.gif
Binary file not shown.
Binary file removed images/py.gif
Binary file not shown.

0 comments on commit fd01979

Please sign in to comment.