Skip to content

Commit

Permalink
🛠 内部拡張の場合にはリンクを作成しないように修正
Browse files Browse the repository at this point in the history
内部拡張の場合、リンク先が存在しないので。
  • Loading branch information
wraith13 committed Sep 13, 2018
1 parent 6dd5413 commit 98070a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

### Removed

- Removed internal extensions links. ( because link destination does not exist )
- Removed images/infohex.1024.png from package.

## 1.0.1 - 2018-09-12
Expand Down
12 changes: 10 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,18 @@ export module SysInfo
},
};
}
interface Extension
{
id : string;
}
function isInternalExtension(extension : Extension) : boolean
{
return extension.id.startsWith("vscode.");
}
export function getExtentionsformation(options : GetSystemInformationOptions) : object
{
return vscode.extensions.all
.filter(extension => (options.withInternalExtensions || !extension.id.startsWith("vscode.")))
.filter(extension => (options.withInternalExtensions || !isInternalExtension(extension)))
.map
(
extension => pass_through =
Expand Down Expand Up @@ -246,7 +254,7 @@ export module SysInfo
return undefined;
}

const extensionLinks = (isExtensionData && data && data.id) ?
const extensionLinks = (isExtensionData && data && data.id && !isInternalExtension(data)) ?
[
`- [open in marketplace](https://marketplace.visualstudio.com/items?itemName=${data.id})\n`,
`- [open in vscode](vscode:extension/${data.id})\n`
Expand Down

0 comments on commit 98070a1

Please sign in to comment.