%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : www.kowitt.ac.th / Your IP : 216.73.216.118 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/Microsoft VS Code/resources/app/extensions/emmet/out/ |
Upload File : |
"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ Object.defineProperty(exports, "__esModule", { value: true }); /* Based on @sergeche's work in his emmet plugin */ const vscode = require("vscode"); const math_expression_1 = require("@emmetio/math-expression"); const bufferStream_1 = require("./bufferStream"); function evaluateMathExpression() { if (!vscode.window.activeTextEditor) { vscode.window.showInformationMessage('No editor is active'); return; } const editor = vscode.window.activeTextEditor; const stream = new bufferStream_1.DocumentStreamReader(editor.document); editor.edit(editBuilder => { editor.selections.forEach(selection => { const pos = selection.isReversed ? selection.anchor : selection.active; stream.pos = pos; try { const result = String(math_expression_1.default(stream, true)); editBuilder.replace(new vscode.Range(stream.pos, pos), result); } catch (err) { vscode.window.showErrorMessage('Could not evaluate expression'); // Ignore error since most likely it’s because of non-math expression console.warn('Math evaluation error', err); } }); }); } exports.evaluateMathExpression = evaluateMathExpression; //# sourceMappingURL=https://ticino.blob.core.windows.net/sourcemaps/0f080e5267e829de46638128001aeb7ca2d6d50e/extensions\emmet\out/evaluateMathExpression.js.map