We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b67e7f7 commit 74f9854Copy full SHA for 74f9854
src/vs/workbench/contrib/terminal/browser/terminalSpeechToText.ts
@@ -140,10 +140,8 @@ export class TerminalSpeechToTextSession extends Disposable {
140
private _updateInput(e: ISpeechToTextEvent): void {
141
if (e.text) {
142
let input = e.text.replaceAll(/[.,?;!]/g, '');
143
-
144
- for (const symbol of Object.values(symbolMap)) {
145
- const regex: RegExp = new RegExp(symbol + '\b');
146
- input = input.replace(regex, symbolMap[symbol]);
+ for (const symbol of Object.entries(symbolMap)) {
+ input = input.replace(new RegExp('\\b' + symbol[0] + '\\b'), symbol[1]);
147
}
148
this._input = ' ' + input;
149
0 commit comments