Skip to content

Commit

Permalink
TS 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dennykorsukewitz committed Feb 2, 2024
1 parent 3715cf8 commit ce8eae8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to the "QuoteWithMarker" extension will be documented in thi

## [2.0.0]

TODO
### Refactoring

- Changed source language to TypeScript.
- Added esbuild to get Browser Editor support.
- Refactored code.

## [1.1.1]

Expand Down
4 changes: 3 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [2.0.0]

TODO
- Changed source language to TypeScript.
- Added esbuild to get Browser Editor support.
- Refactored code.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"vscode": "^1.74.0"
},
"activationEvents": [
"onCommand:quoteWithMarker"
],
"main": "./dist/extension.js",
"browser": "./dist/extension.js",
Expand Down
6 changes: 4 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
// import * as fs from "fs";
// import * as path from 'path';

/**
* @param {vscode.ExtensionContext} context
Expand Down Expand Up @@ -103,6 +101,10 @@ function initQuoteWithMarker(context: vscode.ExtensionContext) {
quoteCharStart = lineComment[languageId as keyof typeof lineComment];
}

if (vscode.env.uiKind === vscode.UIKind.Web && quoteCharStart.length === 0) {
vscode.window.showErrorMessage(`QuoteWithMarker: I could not find any comment characters for the Language ID '${languageId}' in the browser editor. However, you can manually add a comment character for the Language ID '${languageId}' in the settings: quoteWithMarker.lineComment`);
}

// If no quoteCharStart is set, try to use the default value of lineComment of the current language config.
if (quoteCharStart.length === 0 && languageId || quoteCharStart === 'undefined'){
let extensions = vscode.extensions.all;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"target": "ES2022",
"outDir": "dist",
"lib": [
"ES2022"
"ES2022",
],
"sourceMap": true,
"rootDir": "src",
Expand Down

0 comments on commit ce8eae8

Please sign in to comment.