Skip to content

Commit a540fbe

Browse files
author
Keisuke KATO
authored
Merge pull request #27 from k--kato/#25
fixed Auto-generated /// on the new line inside <summary> tag #25
2 parents f9888b8 + 16dcf9e commit a540fbe

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.0.11 (January 8, 2017)
4+
5+
* bug fix - Auto-generated /// on the new line inside <summary> tag. See [#25](https://github.com/k--kato/vscode-docomment/issues/25).
6+
37
## 0.0.10 (December 29, 2016)
48

59
* bug fix - Parameters not correctly identified when documenting constructor which chains to a base class constructor. See [#22](https://github.com/k--kato/vscode-docomment/issues/22).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The menu under File > Preferences (Code > Preferences on Mac) provides entries t
3232

3333
## Installation
3434

35-
1. Install Visual Studio Code 1.7.0 or higher
35+
1. Install Visual Studio Code 1.8.0 or higher
3636
1. Launch Code
3737
1. From the extension view `Ctrl`-`Shift`-`X` (Windows, Linux) or `Cmd`-`Shift`-`X` (macOS)
3838
1. Search and Choose the extension `C# XML Documentation Comments`

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docomment",
3-
"version": "0.0.10",
3+
"version": "0.0.11",
44
"publisher": "k--kato",
55
"engines": {
66
"vscode": "^1.8.0"
@@ -47,13 +47,13 @@
4747
"devDependencies": {
4848
"typescript": "^2.1.4",
4949
"vscode": "^1.0.3",
50-
"tslint": "^4.2.0",
50+
"tslint": "^4.3.1",
5151
"istanbul": "^0.4.5",
5252
"coveralls": "^2.11.15",
5353
"mocha": "^3.2.0",
5454
"mocha-lcov-reporter": "^1.2.0",
55-
"@types/node": "^6.0.54",
56-
"@types/mocha": "^2.2.35"
55+
"@types/node": "^6.0.58",
56+
"@types/mocha": "^2.2.36"
5757
},
5858
"extensionDependencies": [
5959
],

src/SyntacticAnalysis/SyntacticAnalysisCSharp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class SyntacticAnalysisCSharp {
2222
}
2323

2424
public static IsDocComment(activeLine: string): boolean {
25-
return activeLine.match(/^\s*?\/{3}\s*$/) !== null;
25+
return activeLine.match(/\/{3}/) !== null;
2626
}
2727

2828
public static IsDoubleDocComment(activeLine: string): boolean {

src/Utility/StringUtil.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export class StringUtil {
2222
const isEndMethod: boolean = (line.trim().endsWith(')'))
2323
if (isEndMethod) return true;
2424

25+
const isXml: boolean = (line.indexOf('</') !== -1);
26+
if (isXml) return true;
27+
2528
return isCodeBlockStart;
2629
}
2730

test/SyntacticAnalysis/SyntacticAnalysisCSharp.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,5 @@ suite('SyntacticAnalysis.SyntacticAnalysisCSharp.IsClass Tests', () => {
216216
assert.equal(SyntacticAnalysisCSharp.IsDocComment('///'), true, '///');
217217
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' ///'), true, ' ///');
218218
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' /// '), true, ' /// ');
219-
220-
assert.equal(SyntacticAnalysisCSharp.IsDocComment('/// ///'), false, '/// ///');
221-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' /// ///'), false, ' /// ///');
222-
assert.equal(SyntacticAnalysisCSharp.IsDocComment('//////'), false, '//////');
223-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' //////'), false, ' //////');
224-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' /////'), false, ' /////');
225-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' /// //'), false, ' /// //');
226-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' //// ///'), false, ' //// ///');
227-
assert.equal(SyntacticAnalysisCSharp.IsDocComment(' /// <bla>'), false, '\' /// <bla>\'');
228219
});
229220
});

test/TestData/.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
// Press the Enter key to activate a command (Default: false)
4+
"docomment.activateOnEnter": false,
5+
// Insert spaces when pressing Tab.
6+
"editor.insertSpaces": true,
7+
// The number of spaces a tab is equal to.
8+
"editor.tabSize": 4,
9+
// When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents.
10+
"editor.detectIndentation": true
11+
}

0 commit comments

Comments
 (0)