Skip to content

Commit f31ee63

Browse files
author
Benjamin Pasero
committed
Merge branch 'master' into ben/notifications
2 parents 2505c44 + 861c6bf commit f31ee63

97 files changed

Lines changed: 1591 additions & 546 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/calendar.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
'2018-01-30T00:00Z': 'endgame',
3-
'2018-02-07T20:00Z': 'release',
2+
'2018-01-30T02:00Z': 'endgame',
3+
'2018-02-07T20:00Z': 'release', # 1.20.0
44
'2018-02-12T20:00Z': 'development',
5+
'2018-02-14T15:00Z': 'release', # 1.20.1
6+
'2018-02-19T20:00Z': 'development',
7+
'2018-02-27T02:00Z': 'endgame',
58
}

.github/similarity.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
perform: true,
3+
whenCreatedByTeam: false,
4+
comment: "Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:\n${potentialDuplicates}"
5+
}

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ cache:
1212
notifications:
1313
email: false
1414
webhooks:
15-
- http://vscode-probot.westus.cloudapp.azure.com:3450/travis/notifications
16-
- http://vscode-test-probot.westus.cloudapp.azure.com:3450/travis/notifications
15+
- https://vscode-probot.westus.cloudapp.azure.com:7890/travis/notifications
16+
- https://vscode-test-probot.westus.cloudapp.azure.com:7890/travis/notifications
1717

1818
addons:
1919
apt:

build/gulpfile.vscode.win32.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ gulp.task('vscode-win32-x64-archive', ['clean-vscode-win32-x64-archive'], archiv
9696

9797
function copyInnoUpdater(arch) {
9898
return () => {
99-
return gulp.src('build/win32/inno_updater.exe', { base: 'build/win32' })
100-
.pipe(vfs.dest(buildPath(arch)));
99+
return gulp.src('build/win32/{inno_updater.exe,vcruntime140.dll}', { base: 'build/win32' })
100+
.pipe(vfs.dest(path.join(buildPath(arch), 'tools')));
101101
};
102102
}
103103

build/lib/bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ function removeDuplicateTSBoilerplate(destFiles) {
217217
{ start: /^var __metadata/, end: /^};$/ },
218218
{ start: /^var __param/, end: /^};$/ },
219219
{ start: /^var __awaiter/, end: /^};$/ },
220+
{ start: /^var __generator/, end: /^};$/ },
220221
];
221222
destFiles.forEach(function (destFile) {
222223
var SEEN_BOILERPLATE = [];

build/lib/bundle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ function removeDuplicateTSBoilerplate(destFiles: IConcatFile[]): IConcatFile[] {
339339
{ start: /^var __metadata/, end: /^};$/ },
340340
{ start: /^var __param/, end: /^};$/ },
341341
{ start: /^var __awaiter/, end: /^};$/ },
342+
{ start: /^var __generator/, end: /^};$/ },
342343
];
343344

344345
destFiles.forEach((destFile) => {

build/win32/code.iss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ Name: "addtopath"; Description: "{cm:AddToPath}"; GroupDescription: "{cm:Other}"
6868
Name: "runcode"; Description: "{cm:RunAfter,{#NameShort}}"; GroupDescription: "{cm:Other}"; Check: WizardSilent
6969

7070
[Files]
71-
Source: "*"; Excludes: "inno_updater.exe"; DestDir: "{code:GetDestDir}"; Flags: ignoreversion recursesubdirs createallsubdirs
72-
Source: "inno_updater.exe"; DestDir: "{app}\tools"; Flags: ignoreversion
73-
Source: "vcruntime140.dll"; DestDir: "{app}\tools"; Flags: ignoreversion
71+
Source: "*"; Excludes: "\tools,\tools\*"; DestDir: "{code:GetDestDir}"; Flags: ignoreversion recursesubdirs createallsubdirs
72+
Source: "tools\*"; DestDir: "{app}\tools"; Flags: ignoreversion
7473

7574
[Icons]
7675
Name: "{group}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; AppUserModelID: "{#AppUserId}"

build/win32/vcruntime140.dll

81.6 KB
Binary file not shown.

extensions/emmet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@
337337
"@emmetio/html-matcher": "^0.3.3",
338338
"@emmetio/css-parser": "ramya-rao-a/css-parser#vscode",
339339
"@emmetio/math-expression": "^0.1.1",
340-
"vscode-emmet-helper": "^1.1.32",
340+
"vscode-emmet-helper": "^1.1.36",
341341
"vscode-languageserver-types": "^3.5.0",
342342
"image-size": "^0.5.2",
343343
"vscode-nls": "3.2.1"

extensions/emmet/src/abbreviationActions.ts

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ import { getEmmetHelper, getNode, getInnerRange, getMappingForIncludedLanguages,
1010
const trimRegex = /[\u00a0]*[\d|#|\-|\*|\u2022]+\.?/;
1111
const hexColorRegex = /^#\d+$/;
1212

13+
const inlineElements = ['a', 'abbr', 'acronym', 'applet', 'b', 'basefont', 'bdo',
14+
'big', 'br', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i',
15+
'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'map', 'object', 'q',
16+
's', 'samp', 'select', 'small', 'span', 'strike', 'strong', 'sub', 'sup',
17+
'textarea', 'tt', 'u', 'var'];
18+
1319
interface ExpandAbbreviationInput {
1420
syntax: string;
1521
abbreviation: string;
@@ -62,7 +68,8 @@ export function wrapWithAbbreviation(args: any) {
6268
const preceedingWhiteSpace = matches ? matches[1].length : 0;
6369

6470
rangeToReplace = new vscode.Range(rangeToReplace.start.line, rangeToReplace.start.character + preceedingWhiteSpace, rangeToReplace.end.line, rangeToReplace.end.character);
65-
expandAbbrList.push({ syntax, abbreviation, rangeToReplace, textToWrap: ['\n\t$TM_SELECTED_TEXT\n'], filter });
71+
let textToWrap = rangeToReplace.isSingleLine ? ['$TM_SELECTED_TEXT'] : ['\n\t$TM_SELECTED_TEXT\n'];
72+
expandAbbrList.push({ syntax, abbreviation, rangeToReplace, textToWrap, filter });
6673
});
6774

6875
return expandAbbreviationInRange(editor, expandAbbrList, true);
@@ -435,17 +442,29 @@ function expandAbbr(input: ExpandAbbreviationInput): string | undefined {
435442

436443
try {
437444
// Expand the abbreviation
438-
let expandedText = helper.expandAbbreviation(input.abbreviation, expandOptions);
445+
let expandedText;
439446

440447
if (input.textToWrap) {
448+
let parsedAbbr = helper.parseAbbreviation(input.abbreviation, expandOptions);
449+
if (input.rangeToReplace.isSingleLine && input.textToWrap.length === 1) {
450+
451+
// Fetch rightmost element in the parsed abbreviation (i.e the element that will contain the wrapped text).
452+
let wrappingNode = parsedAbbr;
453+
while (wrappingNode && wrappingNode.children && wrappingNode.children.length > 0) {
454+
wrappingNode = wrappingNode.children[wrappingNode.children.length - 1];
455+
}
456+
457+
// If wrapping with a block element, insert newline in the text to wrap.
458+
if (wrappingNode && inlineElements.indexOf(wrappingNode.name) === -1) {
459+
wrappingNode.value = '\n\t' + wrappingNode.value + '\n';
460+
}
461+
}
462+
expandedText = helper.expandAbbreviation(parsedAbbr, expandOptions);
441463
// All $anyword would have been escaped by the emmet helper.
442464
// Remove the escaping backslash from $TM_SELECTED_TEXT so that VS Code Snippet controller can treat it as a variable
443465
expandedText = expandedText.replace('\\$TM_SELECTED_TEXT', '$TM_SELECTED_TEXT');
444-
445-
// If the expanded text is single line then we dont need the \t and \n we added to $TM_SELECTED_TEXT earlier
446-
if (input.textToWrap.length === 1 && expandedText.indexOf('\n') === -1) {
447-
expandedText = expandedText.replace(/\s*\$TM_SELECTED_TEXT\s*/, '$TM_SELECTED_TEXT');
448-
}
466+
} else {
467+
expandedText = helper.expandAbbreviation(input.abbreviation, expandOptions);
449468
}
450469

451470
return expandedText;

0 commit comments

Comments
 (0)