diff --git a/.vscode/extensions.json b/.vscode/extensions.json index beb2d6caa0a..6cb9439d5c7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,5 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 + // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format "recommendations": [ "eg2.tslint", diff --git a/.vscode/settings.json b/.vscode/settings.json index 290bc0fff88..614054ee14e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,5 +24,6 @@ "windows": { "command": "${workspaceRoot}\\scripts\\test.bat --coverage --run ${file}" } - }] + }], + "typescript.check.workspaceVersion": false } \ No newline at end of file diff --git a/OSSREADME.json b/OSSREADME.json index 1c3d9cb2135..2943d4f0b5e 100644 --- a/OSSREADME.json +++ b/OSSREADME.json @@ -36,6 +36,36 @@ ], "isProd": true }, +{ + "isLicense": true, + "name": "chokidar", + "repositoryURL": "https://github.com/paulmillr/chokidar", + "license": "MIT", + "licenseDetail": [ + "The MIT license.", + "", + "Copyright (c) 2012 - 2016 Paul Miller [paulmillr.com](http://paulmillr.com) & Elan Shanker", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of", + "this software and associated documentation files (the \"Software\"), to deal in", + "the Software without restriction, including without limitation the rights to", + "use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies", + "of the Software, and to permit persons to whom the Software is furnished to do", + "so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE." + ], + "isProd": true +}, { "name": "chromium", "version": "52.0.2743.82", @@ -81,13 +111,13 @@ }, { "name": "nodejs", - "version": "6.3.0", + "version": "6.5.0", "repositoryURL": "https://github.com/nodejs/node", "isProd": true }, { "name": "electron", - "version": "1.3.5", + "version": "1.3.7", "license": "MIT", "repositoryURL": "https://github.com/electron/electron", "isProd": true diff --git a/README.md b/README.md index 119cf632d13..137fa8e3212 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope ## Feedback * Ask a question on [Stack Overflow](http://stackoverflow.com/questions/tagged/vscode). -* Request a new feature on [Github](CONTRIBUTING.md). +* Request a new feature on [GitHub](CONTRIBUTING.md). * Vote for [popular feature requests](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc). * File a bug in [GitHub Issues](https://github.com/Microsoft/vscode/issues). * [Tweet](https://twitter.com/code) us with other feedback. diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index f9b177b151f..3408788037d 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -248,25 +248,23 @@ END OF Colorsublime-Themes NOTICES AND INFORMATION %% daaain/Handlebars NOTICES AND INFORMATION BEGIN HERE ========================================= -The MIT License (MIT) +-- Credits -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Adapted from the great sublime-text-handlebars package by Nicholas Westlake. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Thanks a lot to all the generous contributors (in alphabetical order): @bittersweetryan, @bradcliffe, @calumbrodie, @duncanbeevers, @hlvnst, @jonschlinkert, @Krutius, @samselikoff, @utkarshkukreti, @zeppelin -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +-- License + +(The MIT License) + +Copyright (c) daaain/Handlebars project authors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ========================================= END OF daaain/Handlebars NOTICES AND INFORMATION diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 5b9ef7f0c7a..dabac01f5ab 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -28,6 +28,7 @@ const commit = util.getVersion(root); const packageJson = require('../package.json'); const product = require('../product.json'); const shrinkwrap = require('../npm-shrinkwrap.json'); +const crypto = require('crypto'); const dependencies = Object.keys(shrinkwrap.dependencies); const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n)); @@ -38,7 +39,8 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.6.2' } + { name: 'ms-vscode.node-debug', version: '1.6.8' }, + { name: 'ms-vscode.node-debug2', version: '0.0.7' } ]; const vscodeEntryPoints = _.flatten([ @@ -68,7 +70,7 @@ const vscodeResources = [ 'out-build/vs/workbench/parts/git/**/*.html', 'out-build/vs/workbench/parts/git/**/*.sh', 'out-build/vs/workbench/parts/html/browser/webview.html', - 'out-build/vs/workbench/parts/extensions/electron-browser/media/markdown.css', + 'out-build/vs/**/markdown.css', 'out-build/vs/workbench/parts/tasks/**/*.json', 'out-build/vs/workbench/parts/terminal/electron-browser/terminalProcess.js', 'out-build/vs/workbench/services/files/**/*.exe', @@ -142,6 +144,40 @@ gulp.task('electron', ['clean-electron'], () => { const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; +/** + * Compute checksums for some files. + * + * @param {string} out The out folder to read the file from. + * @param {string[]} filenames The paths to compute a checksum for. + * @return {Object} A map of paths to checksums. + */ +function computeChecksums(out, filenames) { + var result = {}; + filenames.forEach(function(filename) { + var fullPath = path.join(process.cwd(), out, filename); + result[filename] = computeChecksum(fullPath); + }); + return result; +} + +/** + * Compute checksum for a file. + * + * @param {string} filename The absolute path to a filename. + * @return {string} The checksum for `filename`. + */ +function computeChecksum(filename) { + var contents = fs.readFileSync(filename); + + var hash = crypto + .createHash('md5') + .update(contents) + .digest('base64') + .replace(/=+$/, ''); + + return hash; +} + function packageTask(platform, arch, opts) { opts = opts || {}; @@ -152,12 +188,19 @@ function packageTask(platform, arch, opts) { return () => { const out = opts.minified ? 'out-vscode-min' : 'out-vscode'; + const checksums = computeChecksums(out, [ + 'vs/workbench/workbench.main.js', + 'vs/workbench/workbench.main.css', + 'vs/workbench/electron-browser/bootstrap/index.html', + 'vs/workbench/electron-browser/bootstrap/index.js' + ]); + const src = gulp.src(out + '/**', { base: '.' }) .pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + out), 'out'); })) .pipe(util.setExecutableBit(['**/*.sh'])); - const extensions = gulp.src([ - 'extensions/**', + const extensionsList = [ + 'extensions/*/**', '!extensions/*/src/**', '!extensions/*/out/**/test/**', '!extensions/*/test/**', @@ -170,8 +213,11 @@ function packageTask(platform, arch, opts) { '!extensions/**/tsconfig.json', '!extensions/typescript/bin/**', '!extensions/vscode-api-tests/**', - '!extensions/vscode-colorize-tests/**' - ], { base: '.' }); + '!extensions/vscode-colorize-tests/**', + ...builtInExtensions.map(e => `!extensions/${ e.name }/**`) + ]; + + const extensions = gulp.src(extensionsList, { base: '.' }); const marketplaceExtensions = es.merge(...builtInExtensions.map(extension => { return ext.src(extension.name, extension.version) @@ -207,7 +253,7 @@ function packageTask(platform, arch, opts) { const date = new Date().toISOString(); const productJsonStream = gulp.src(['product.json'], { base: '.' }) - .pipe(json({ commit, date })); + .pipe(json({ commit, date, checksums })); const license = gulp.src(['LICENSES.chromium.html', 'LICENSE.txt', 'ThirdPartyNotices.txt', 'licenses/**'], { base: '.' }); @@ -222,6 +268,7 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('oniguruma', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('windows-mutex', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('native-keymap', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node'])) + .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('pty.js', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['build/Release/**'])); let all = es.merge( diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index 628a9dff844..14eb03518ff 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -151,14 +151,14 @@ gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf')); gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb', 'vscode-linux-ia32-min'], prepareDebPackage('ia32')); gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb', 'vscode-linux-x64-min'], prepareDebPackage('x64')); -gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb', 'vscode-linux-arm-min'], prepareDebPackage('armhf')); +gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb', 'vscode-linux-arm-min'], prepareDebPackage('arm')); gulp.task('vscode-linux-ia32-build-deb', ['vscode-linux-ia32-prepare-deb'], buildDebPackage('ia32')); gulp.task('vscode-linux-x64-build-deb', ['vscode-linux-x64-prepare-deb'], buildDebPackage('x64')); -gulp.task('vscode-linux-arm-build-deb', ['vscode-linux-arm-prepare-deb'], buildDebPackage('armhf')); +gulp.task('vscode-linux-arm-build-deb', ['vscode-linux-arm-prepare-deb'], buildDebPackage('arm')); gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm', 'vscode-linux-ia32-min'], prepareRpmPackage('ia32')); gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm', 'vscode-linux-x64-min'], prepareRpmPackage('x64')); -gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm', 'vscode-linux-arm-min'], prepareRpmPackage('armhf')); +gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm', 'vscode-linux-arm-min'], prepareRpmPackage('arm')); gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buildRpmPackage('ia32')); gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64')); -gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('armhf')); +gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm')); diff --git a/build/win32/code.iss b/build/win32/code.iss index 0f52f9660f6..5fb79892bde 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -44,6 +44,7 @@ Name: "simplifiedChinese"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.zh Name: "traditionalChinese"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.zh-tw.isl,{#RepoDir}\build\win32\i18n\messages.zh-tw.isl" {#LocalizedLanguageFile("cht")} [InstallDelete] +Type: filesandordirs; Name: {app}\resources\app\out Type: filesandordirs; Name: {app}\resources\app\plugins Type: filesandordirs; Name: {app}\resources\app\extensions Type: filesandordirs; Name: {app}\resources\app\node_modules @@ -296,18 +297,21 @@ Root: HKCR; Subkey: "{#RegValueName}.gemspec\shell\open\command"; ValueType: str Root: HKCR; Subkey: ".gitattributes\OpenWithProgids"; ValueType: none; ValueName: "{#RegValueName}"; Flags: deletevalue uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: ".gitattributes\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.gitattributes"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitattributes"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,Git Attributes}"; Flags: uninsdeletekey; Tasks: associatewithfiles +Root: HKCR; Subkey: "{#RegValueName}.gitattributes"; ValueType: string; ValueName: "AlwaysShowExt"; ValueData: ""; Flags: uninsdeletekey; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitattributes\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico"; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitattributes\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles Root: HKCR; Subkey: ".gitconfig\OpenWithProgids"; ValueType: none; ValueName: "{#RegValueName}"; Flags: deletevalue uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: ".gitconfig\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.gitconfig"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitconfig"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,Git Config}"; Flags: uninsdeletekey; Tasks: associatewithfiles +Root: HKCR; Subkey: "{#RegValueName}.gitconfig"; ValueType: string; ValueName: "AlwaysShowExt"; ValueData: ""; Flags: uninsdeletekey; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitconfig\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico"; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitconfig\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles Root: HKCR; Subkey: ".gitignore\OpenWithProgids"; ValueType: none; ValueName: "{#RegValueName}"; Flags: deletevalue uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: ".gitignore\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.gitignore"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitignore"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,Git Ignore}"; Flags: uninsdeletekey; Tasks: associatewithfiles +Root: HKCR; Subkey: "{#RegValueName}.gitignore"; ValueType: string; ValueName: "AlwaysShowExt"; ValueData: ""; Flags: uninsdeletekey; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitignore\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico"; Tasks: associatewithfiles Root: HKCR; Subkey: "{#RegValueName}.gitignore\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json index 5a3feef73f3..3de9c5957ee 100644 --- a/extensions/css/server/npm-shrinkwrap.json +++ b/extensions/css/server/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "1.0.9-next.1", + "version": "1.1.0", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-1.0.9-next.1.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-1.1.0.tgz" }, "vscode-jsonrpc": { "version": "2.3.2-next.5", diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index a5a90bb7138..6c562f095da 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,7 +8,7 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^1.0.9-next.1", + "vscode-css-languageservice": "^1.1.0", "vscode-languageserver": "^2.4.0-next.12" }, "scripts": { diff --git a/extensions/handlebars/OSSREADME.json b/extensions/handlebars/OSSREADME.json index 4cd9f77af8b..619107dcf6a 100644 --- a/extensions/handlebars/OSSREADME.json +++ b/extensions/handlebars/OSSREADME.json @@ -3,5 +3,24 @@ "name": "daaain/Handlebars", "version": "0.0.0", "license": "MIT", - "repositoryURL": "https://github.com/daaain/Handlebars" + "repositoryURL": "https://github.com/daaain/Handlebars", + "licenseDetail": [ + "-- Credits", + "", + "Adapted from the great sublime-text-handlebars package by Nicholas Westlake.", + "", + "Thanks a lot to all the generous contributors (in alphabetical order): @bittersweetryan, @bradcliffe, @calumbrodie, @duncanbeevers, @hlvnst, @jonschlinkert, @Krutius, @samselikoff, @utkarshkukreti, @zeppelin", + "", + "-- License", + "", + "(The MIT License)", + "", + "Copyright (c) daaain/Handlebars project authors", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + ] }] diff --git a/extensions/handlebars/language-configuration.json b/extensions/handlebars/language-configuration.json index 0aa8cec1ade..c71a5655d5e 100644 --- a/extensions/handlebars/language-configuration.json +++ b/extensions/handlebars/language-configuration.json @@ -5,15 +5,16 @@ "brackets": [ [""], ["<", ">"], - ["{{", "}}"] + ["{{", "}}"], + ["{", "}"], + ["(", ")"] ], "autoClosingPairs": [ { "open": "{", "close": "}"}, { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "'", "close": "'" }, - { "open": "\"", "close": "\"" }, - { "open": "<", "close": ">" } + { "open": "\"", "close": "\"" } ], "surroundingPairs": [ { "open": "'", "close": "'" }, diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index 51c995f2e50..2273bc99c8d 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -77,4 +77,19 @@ export function activate(context: ExtensionContext) { } ], }); + + languages.setLanguageConfiguration('razor', { + wordPattern: /("(?:[^\\\"]*(?:\\.)?)*"?)|('(?:[^\\\']*(?:\\.)?)*'?)|[^\s<>={}\[\],]+/, + onEnterRules:[ + { + beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join('|')}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'), + afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i, + action: { indentAction: IndentAction.IndentOutdent } + }, + { + beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join('|')}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'), + action: { indentAction: IndentAction.Indent } + } + ], + }); } \ No newline at end of file diff --git a/extensions/html/language-configuration.json b/extensions/html/language-configuration.json index 3c8204c2187..060646fc820 100644 --- a/extensions/html/language-configuration.json +++ b/extensions/html/language-configuration.json @@ -4,15 +4,16 @@ }, "brackets": [ [""], - ["<", ">"] + ["<", ">"], + ["{", "}"], + ["(", ")"] ], "autoClosingPairs": [ { "open": "{", "close": "}"}, { "open": "[", "close": "]"}, { "open": "(", "close": ")" }, { "open": "'", "close": "'" }, - { "open": "\"", "close": "\"" }, - { "open": "<", "close": ">" } + { "open": "\"", "close": "\"" } ], "surroundingPairs": [ { "open": "'", "close": "'" }, diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index dbc98e32af3..b9b3ded6389 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -498,7 +498,7 @@ "include": "#jsx-tag-invalid" }, { - "begin": "(?<=(?:'|\"|})>)", + "begin": "(?)(?<=(?:'|\"|})>)", "end": "(?=include #fenced_code_block_tsx + + include + #fenced_code_block_csharp + include #link-def @@ -218,7 +222,7 @@ 2 name - punctuation.definition.quote.markdown + beginning.punctuation.definition.quote.markdown name @@ -283,7 +287,7 @@ begin - (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del).*</\2\s*>\s*$) + (?i)(^|\G)\s*(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del).*</\2\s*>\s*$) end $ patterns @@ -296,7 +300,7 @@ begin - (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)) + (?i)(^|\G)\s*(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)) patterns @@ -305,7 +309,7 @@ while - \G(?!</\2\s*>) + ^(?!\s*$) @@ -432,7 +436,7 @@ 3 name - punctuation.definition.list.markdown + beginning.punctuation.definition.list.markdown comment @@ -461,7 +465,7 @@ 3 name - punctuation.definition.list.markdown + beginning.punctuation.definition.list.markdown name @@ -485,7 +489,7 @@ paragraph begin - (^|\G)(?=\S) + (^|\G)[ ]{0,3}(?=\S) name meta.paragraph.markdown patterns @@ -507,7 +511,7 @@ - (^|\G)(?!\s*$|#|[ ]{0,3}((([-*_][ ]{0,2}\2){2,}[ \t]*$\n?)|([*+-]([ ]{1,3}|\t)))|\s*\[.+?\]:|>) + (^|\G)(?!\s*$|#|[ ]{0,3}((([*_][ ]{0,2}\2){2,}[ \t]*$\n?)|([*+-]([ ]{1,3}|\t)))|\s*\[.+?\]:|>) raw_block @@ -525,7 +529,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -541,7 +545,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -557,7 +561,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -573,7 +577,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -589,7 +593,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -605,7 +609,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -621,7 +625,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -637,7 +641,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -653,7 +657,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -669,7 +673,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -685,7 +689,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -701,7 +705,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -717,7 +721,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -733,7 +737,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -749,7 +753,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -765,7 +769,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -781,7 +785,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -797,7 +801,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -813,7 +817,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -829,7 +833,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -845,7 +849,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -861,7 +865,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -877,7 +881,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -893,7 +897,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -909,7 +913,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -925,7 +929,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -941,7 +945,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -957,7 +961,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -973,7 +977,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -989,7 +993,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1005,7 +1009,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1021,7 +1025,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1037,7 +1041,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1053,7 +1057,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1069,7 +1073,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1085,7 +1089,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1101,7 +1105,7 @@ name markup.fenced_code.block.markdown end - (^|\G)(\2)\n + (^|\G)[ ]{0,3}(\2)\s*\n patterns @@ -1110,10 +1114,26 @@ + fenced_code_block_csharp + + begin + (^|\G)\s*([`~]{3,})\s*(cs|csharp|c#)\s*$ + name + markup.fenced_code.block.markdown + end + (^|\G)(\2)\n + patterns + + + include + source.cs + + + separator match - (^|\G)[ ]{0,3}([-*_])([ ]{0,2}\2){2,}[ \t]*$\n? + (^|\G)[ ]{0,3}([*-_])([ ]{0,2}\2){2,}[ \t]*$\n? name meta.separator.markdown diff --git a/extensions/markdown/test/colorize-fixtures/test.md b/extensions/markdown/test/colorize-fixtures/test.md index ee7b78e670b..4458036582a 100644 --- a/extensions/markdown/test/colorize-fixtures/test.md +++ b/extensions/markdown/test/colorize-fixtures/test.md @@ -4,6 +4,12 @@ ## Markdown plus h2 with a custom ID ## {#id-goes-here} [Link back to H2](#id-goes-here) +### Alternate heading styles: +Alternate Header 1 +================== +Alternate Header 2 +------------------ +
diff --git a/extensions/markdown/test/colorize-results/test_md.json b/extensions/markdown/test/colorize-results/test_md.json index 5ef0d4cf221..b9292e60bf3 100644 --- a/extensions/markdown/test/colorize-results/test_md.json +++ b/extensions/markdown/test/colorize-results/test_md.json @@ -241,6 +241,83 @@ "hc_black": ".hc-black .token rgb(255, 255, 255)" } }, + { + "c": "###", + "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.definition.heading.markdown.markup.punctuation", + "r": { + "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", + "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", + "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", + "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", + "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" + } + }, + { + "c": " ", + "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.heading.markdown.markup", + "r": { + "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", + "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", + "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", + "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", + "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" + } + }, + { + "c": "Alternate heading styles:", + "t": "${1/(#)(#)?(#)?(#)?(#)?(#)?/${6:?6:${5:?5:${4:?4:${3:?3:${2:?2:1}}}}}/}.entity.heading.markdown.markup.name.section", + "r": { + "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", + "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", + "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", + "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", + "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" + } + }, + { + "c": "Alternate Header 1", + "t": "markdown.meta.paragraph", + "r": { + "dark_plus": ".vs-dark .token rgb(212, 212, 212)", + "light_plus": ".vs .token rgb(0, 0, 0)", + "dark_vs": ".vs-dark .token rgb(212, 212, 212)", + "light_vs": ".vs .token rgb(0, 0, 0)", + "hc_black": ".hc-black .token rgb(255, 255, 255)" + } + }, + { + "c": "==================", + "t": "1.heading.markdown.markup.meta.paragraph.setext", + "r": { + "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", + "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", + "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", + "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", + "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" + } + }, + { + "c": "Alternate Header 2", + "t": "markdown.meta.paragraph", + "r": { + "dark_plus": ".vs-dark .token rgb(212, 212, 212)", + "light_plus": ".vs .token rgb(0, 0, 0)", + "dark_vs": ".vs-dark .token rgb(212, 212, 212)", + "light_vs": ".vs .token rgb(0, 0, 0)", + "hc_black": ".hc-black .token rgb(255, 255, 255)" + } + }, + { + "c": "------------------", + "t": "2.heading.markdown.markup.meta.paragraph.setext", + "r": { + "dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.markup.heading rgb(86, 156, 214)", + "light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.markup.heading rgb(128, 0, 0)", + "dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.markup.heading rgb(86, 156, 214)", + "light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.markup.heading rgb(128, 0, 0)", + "hc_black": ".hc-black.vscode-theme-defaults-themes-hc_black-json .token.markup.heading rgb(103, 150, 230)" + } + }, { "c": "