Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from 365businessdev/dev
Browse files Browse the repository at this point in the history
#12 match complete procedure definition
  • Loading branch information
365businessdev committed Jul 20, 2020
2 parents 7f5aa97 + 910960b commit 69def07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,8 @@ All notable changes to the "AL XML Documentation" extension will be documented i

- Fixed Issue [#12](https://github.com/365businessdev/vscode-alxmldocumentation/issues/12) - Fixed Inside code detection (begin-end).
- Added `exportScope` description.
- Added diagnostic information and quick fix actions.
- Added diagnostic information and quick fix actions.

## [0.4.1] - 2020-07-20
- Fixed Issue [#14](https://github.com/365businessdev/vscode-alxmldocumentation/issues/14) - Fixed procedure overload support for diagnostics.
- Removed `trigger`-procedures from diagnostics.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "AL XML Documentation",
"description": "Generate AL XML documentation comments and create Markdown documentation from your source code.",
"publisher": "365businessdevelopment",
"version": "0.4.0",
"version": "0.4.1",
"icon": "res/icon.png",
"author": {
"name": "Christoph Krieg",
Expand Down
4 changes: 2 additions & 2 deletions src/util/ALSyntaxUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class ALSyntaxUtil {

public static FindProcedures(code: string): any {
let procedures: { procedureName : string, lineNo: number }[] = [];
code.match(/(trigger|(?!local)procedure|(?!internal)procedure)\s+([A-Za-z0-9_]+)\b[^\(]*\)*/g)?.forEach(match => {
code.match(/(?<!\/\/\/\s*)(((?!local)procedure|(?!internal)procedure)\s+([A-Za-z0-9_]+)\b[^\(]*\)*.+)/g)?.forEach(match => {
procedures.push({
procedureName: match,
lineNo: this.GetProcedureLineNo(match, code)
Expand All @@ -120,7 +120,7 @@ export class ALSyntaxUtil {
let codeLines = code.split("\r\n");
let pos: number = -1;
codeLines.filter((x) => {
if (x.includes(" " + procedureName + "(")) {
if (x.includes(procedureName)) {
pos = codeLines.indexOf(x);
}
});
Expand Down

0 comments on commit 69def07

Please sign in to comment.