-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
From @isaklafleur on September 22, 2017 9:1
- VSCode Version:
- OS Version:
Steps to Reproduce:
I'm using prettier extension and it recommends to break on to separates lines. VSC don't color the variable name according to function color if the arguments are not on the same line.
Paste this in editor and you will see the standard function variable color does appear on function findAbbreviations
, but not on replaceAbbreviationsWithExpansions
const findAbbreviations = (string, arrayOfAbbreviations) => {
const stringArray = stringSplit(string);
const abbreviationMatches = [];
arrayOfAbbreviations.forEach(item => {
if (stringArray.indexOf(item.abbreviation) >= 0) {
abbreviationMatches.push({
abbreviation: item.abbreviation,
expansion: item.expansion
});
}
});
return abbreviationMatches;
};
const replaceAbbreviationsWithExpansions = (
string,
abbreviations,
findAbbreviations
) => {
if (findAbbreviations.length > 0) {
const abbreviationMatches = findAbbreviations(string, abbreviations);
let newString = string;
abbreviationMatches.forEach(item => {
newString = newString.replace(item.abbreviation, item.expansion);
});
return newString;
} else {
return string;
}
};
Reproduces without extensions: Yes/No
Yes
Copied from original issue: microsoft/vscode#34813
chmln and lensbart
Metadata
Metadata
Assignees
Labels
No labels