INNER CODE UNIT · TypeScript

regEx

bioSyntax/bioSyntax · vscode/src/extension.ts:110

            regEx = /\S+\s+(\S+)/;
            let line_offset: number = 0;
            for (let line_n in lines) {
                let line = lines[line_n];
                if (line_offset!==0) {
                    let match = regEx.exec(line);
                    if (match) {
                        let col_1_len = match[0].length - match[1].length;
                        for (let index = 0; index < match[1].length; index++)
                        {
                            let key = match[1][index].toUpperCase();
                            let start_pos = activeEditor.document.positionAt(col_1_len+offset+index);
                            let end_pos = activeEditor.document.positionAt(col_1_len+offset+index+1);
                            let decoration = {range: new vscode.Range(start_pos, end_pos)};
                            updateDecorationArrays(key, decoration);
                        }
                    }
                }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…