Skip to content

Emmet: Could not evaluate selected math expression #98041

@yegor-mialyk

Description

@yegor-mialyk

Steps to Reproduce:

  1. Open a new editor
  2. Type the following line: Test2 1+2
  3. Select 1+2 in the text
  4. Select "Emmet: Evaluate Math Expression" from the command palette

Expected result
The expression being exchanged with '3', as the result the text should look as follows: Test2 3

Actual result
An error notification saying "Could not evaluate expression."

It looks like the feature does not respect user's text selection.

Does this issue occur when all extensions are disabled? Yes

Exception (partial):

Math evaluation error Error: Unexpected number at column [object Object] of expression
at O (c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:78244)
at c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:76564
at E (c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:77058)
at Module.t.default (c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:78554)
at c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:75524
at Array.forEach ()
at c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:75437
at t.ExtHostTextEditor.edit (c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:584:588)
at Object.t.evaluateMathExpression (c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:75415)
at c:\Users\Yegor\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\emmet\dist\extension.js:1:50190

VS Code:
Version: 1.45.1 (user setup)
Commit: 5763d90
Date: 2020-05-14T08:27:35.169Z (3 days ago)
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugemmetEmmet related issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions