Skip to content

Commit

Permalink
* Fix "$@" combination for strings.
Browse files Browse the repository at this point in the history
* Fix formatting at readonly editor windows.
  • Loading branch information
Leopotam committed Sep 11, 2017
1 parent 327d99c commit c8c8b10
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 70 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* v0.0.33
* Fix "$@" combination for strings.
* Fix formatting at readonly editor windows.
* v0.0.32
* Fix foreach loop without parentheses.
* v0.0.31
Expand Down
116 changes: 61 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"default": "icon-128.png"
},
"icon": "icon-128.png",
"version": "0.0.32",
"version": "0.0.33",
"publisher": "Leopotam",
"engines": {
"vscode": "^1.13.0"
"vscode": "^1.16.0"
},
"categories": [
"Formatters",
Expand All @@ -24,14 +24,14 @@
"name": "Leopotam",
"email": "[email protected]"
},
"main": "./out/src/extension",
"main": "./out/extension.js",
"contributes": {
"keybindings": [
{
"command": "csharpfixformat.process",
"key": "ctrl+alt+i",
"mac": "ctrl+alt+i",
"when": "editorTextFocus && resourceLangId == csharp"
"when": "editorTextFocus && !editorReadonly && resourceLangId == csharp"
}
],
"commands": [
Expand All @@ -43,7 +43,7 @@
"menus": {
"editor/context": [
{
"when": "resourceLangId == csharp",
"when": "editorTextFocus && !editorReadonly && resourceLangId == csharp",
"command": "csharpfixformat.process",
"group": "modification"
}
Expand Down Expand Up @@ -159,9 +159,9 @@
"package": "node_modules/.bin/vsce package"
},
"devDependencies": {
"@types/node": "^7.0.43",
"@types/node": "^8.0.28",
"tslint": "^5.7.0",
"typescript": "^2.5.1",
"typescript": "^2.5.2",
"vsce": "^1.30.0",
"vscode": "^1.1.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const process = (content: string, options: IFormatConfig): IResult => {
content = replaceCode(content, /#(region|endregion)/gm, s => `// __vscode_pp_region__${s}`);

// masking content of interpolated strings.
content = replaceNonCommentedCode(content, /(\$"(?:\{[^\n]*?\}|[^\n"\\]|\\.|"")*")/gm, s => {
content = replaceNonCommentedCode(content, /(\$@?"(?:\{[^\n]*?\}|[^\n"\\]|\\.|"")*")/gm, s => {
return s.replace(/\{/g, '__vscode_pp_lerp_start__" +')
.replace(/\}/g, '+ "__vscode_pp_lerp_end__');
});
Expand Down
10 changes: 3 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"target": "es2017",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": ".",
"removeComments": true,
"strictNullChecks": true,
"noImplicitAny": true,
"allowJs": true
},
"include": [
"src/**/*.ts",
"src/**/*.js"
"src"
]
}

0 comments on commit c8c8b10

Please sign in to comment.