Skip to content

Commit

Permalink
Настройка подсказки озвучивания фразы
Browse files Browse the repository at this point in the history
  • Loading branch information
lintest committed Jul 12, 2021
1 parent ebd1cf7 commit 0e9806a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/languages/turbo-gherkin/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class VanessaGherkinProvider {
public get variables(): any { return this._variables; }
public get steps(): any { return this._steps; }

protected _soundHint = "Sound";
protected _syntaxMsg = "Syntax error";
protected _keywords: string[][] = [];
protected _metatags: string[] = ["try", "except", "попытка", "исключение"];
Expand Down Expand Up @@ -145,6 +146,10 @@ export class VanessaGherkinProvider {

public setVariablesArea = this.setHyperlinks;

public setSoundHint = (arg: string): void => {
this._soundHint = arg;
}

public setElements = (values: string, clear: boolean = false): void => {
if (clear) this.clearObject(this.elements);
let obj = JSON.parse(values);
Expand Down Expand Up @@ -430,7 +435,7 @@ export class VanessaGherkinProvider {
let line = model.getLineContent(position.lineNumber)
let match = line.match(/^\s*\*/);
if (match) {
let head = "Озвучить фразу";
let head = this._soundHint;
let char = String.fromCharCode(60277);
let href = "#sound:" + position.lineNumber;
let text = line.substr(match[0].length);
Expand Down

0 comments on commit 0e9806a

Please sign in to comment.