vscode-markdown-shortcuts icon indicating copy to clipboard operation
vscode-markdown-shortcuts copied to clipboard

`.toggleItalic` failed

Open zachvalenta opened this issue 5 years ago • 3 comments

When I try to italicize I get this error:

'md-shortcut.toggleItalic' failed

With bold, if I use the default keymapping (ctrl b) nothing gets bolded. Bold only seems to work if I use a custom keymap (in my case, cmd b).

Could be related to (https://github.com/mdickin/vscode-markdown-shortcuts/issues/59)

Screen Shot 2019-12-12 at 7 41 53 PM

zachvalenta avatar Dec 13 '19 00:12 zachvalenta

This seems to be caused by the latest VS Code update; my work machine has version 1.40.1, whereas my home machine (where I'm seeing the problem) is on 1.41.0

zachvalenta avatar Dec 17 '19 15:12 zachvalenta

I fixed this by deleting line 66 and changing line 68 in command.js: const pattern = new RegExp('\\'+marker+'?' + wordMatch + '*'+'\\'+marker+'?'); return editorHelpers.surroundSelection(marker, marker);

I did not create a pull request because I do not know if it has broken anything. Italic now works. however.

brainhaver avatar Jul 11 '20 02:07 brainhaver

I'm seeing this too with * as a italic marker.

funnym0nk3y avatar May 24 '21 11:05 funnym0nk3y