diff --git a/package.json b/package.json index dee70b2f..227297cb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-arduino", "displayName": "Arduino", "description": "Arduino for Visual Studio Code", - "version": "0.2.15-rc", + "version": "0.2.15-rc2", "publisher": "vsciot-vscode", "aiKey": "83dd2c27-6594-41d3-85a9-bdb22070eb42", "preview": true, @@ -471,8 +471,9 @@ "mimetypes": [ "text/x-code-output" ] - }, { - "id": "arduino", + }, + { + "id": "cpp", "extensions": [ ".ino" ], diff --git a/src/deviceContext.ts b/src/deviceContext.ts index 0f08ef82..93157aee 100644 --- a/src/deviceContext.ts +++ b/src/deviceContext.ts @@ -249,7 +249,7 @@ export class DeviceContext implements IDeviceContext, vscode.Disposable { } public get prebuild() { - return this._prebuild.trim(); + return this._prebuild.trim ? this._prebuild.trim() : ""; } public get output() { diff --git a/src/extension.ts b/src/extension.ts index 880c99e7..7aa001df 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -177,7 +177,7 @@ export async function activate(context: vscode.ExtensionContext) { const newSketchFileName = await vscode.window.showInputBox({ placeHolder: sketchFileName, validateInput: (value) => { - if (value && /^\w+\.((ino)|(cpp)|c)$/.test(value.trim())) { + if (value && /\.((ino)|(cpp)|c)$/.test(value.trim())) { return null; } else { return "Invalid sketch file name. Should be *.ino/*.cpp/*.c";