mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -37,5 +37,8 @@
|
||||
["(", ")"],
|
||||
["[", "]"],
|
||||
["`", "`"]
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"offSide": true
|
||||
}
|
||||
}
|
||||
150
extensions/markdown/npm-shrinkwrap.json
generated
150
extensions/markdown/npm-shrinkwrap.json
generated
@@ -2,75 +2,189 @@
|
||||
"name": "vscode-markdown",
|
||||
"version": "0.2.0",
|
||||
"dependencies": {
|
||||
"@types/highlight.js": {
|
||||
"version": "9.1.10",
|
||||
"from": "@types/highlight.js@9.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.1.10.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"@types/markdown-it": {
|
||||
"version": "0.0.2",
|
||||
"from": "@types/markdown-it@0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-0.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.0.43",
|
||||
"from": "@types/node@7.0.43",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.43.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"applicationinsights": {
|
||||
"version": "0.18.0",
|
||||
"from": "applicationinsights@0.18.0",
|
||||
"from": "applicationinsights@https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz"
|
||||
},
|
||||
"argparse": {
|
||||
"version": "1.0.9",
|
||||
"from": "argparse@>=1.0.7 <2.0.0",
|
||||
"from": "argparse@https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz"
|
||||
},
|
||||
"binaryextensions": {
|
||||
"version": "1.0.1",
|
||||
"from": "binaryextensions@1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"from": "core-util-is@1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"entities": {
|
||||
"version": "1.1.1",
|
||||
"from": "entities@>=1.1.1 <1.2.0",
|
||||
"from": "entities@https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz"
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "1.0.5",
|
||||
"from": "escape-string-regexp@1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"gulp-rename": {
|
||||
"version": "1.2.2",
|
||||
"from": "gulp-rename@1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"gulp-replace": {
|
||||
"version": "0.5.4",
|
||||
"from": "gulp-replace@0.5.4",
|
||||
"resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.5.4.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.5.0",
|
||||
"from": "highlight.js@>=9.3.0 <10.0.0",
|
||||
"from": "highlight.js@https://registry.npmjs.org/highlight.js/-/highlight.js-9.5.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.5.0.tgz"
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"from": "inherits@2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"from": "isarray@1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"istextorbinary": {
|
||||
"version": "1.0.2",
|
||||
"from": "istextorbinary@1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"linkify-it": {
|
||||
"version": "2.0.3",
|
||||
"from": "linkify-it@>=2.0.0 <3.0.0",
|
||||
"from": "linkify-it@https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz"
|
||||
},
|
||||
"markdown-it": {
|
||||
"version": "8.2.2",
|
||||
"from": "markdown-it@8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.2.2.tgz"
|
||||
"version": "8.4.0",
|
||||
"from": "markdown-it@8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.0.tgz"
|
||||
},
|
||||
"markdown-it-named-headers": {
|
||||
"version": "0.0.4",
|
||||
"from": "markdown-it-named-headers@0.0.4",
|
||||
"from": "markdown-it-named-headers@https://registry.npmjs.org/markdown-it-named-headers/-/markdown-it-named-headers-0.0.4.tgz",
|
||||
"resolved": "https://registry.npmjs.org/markdown-it-named-headers/-/markdown-it-named-headers-0.0.4.tgz"
|
||||
},
|
||||
"mdurl": {
|
||||
"version": "1.0.1",
|
||||
"from": "mdurl@>=1.0.1 <1.1.0",
|
||||
"from": "mdurl@https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz"
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"from": "object-assign@4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "1.0.7",
|
||||
"from": "process-nextick-args@1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.3",
|
||||
"from": "readable-stream@2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"replacestream": {
|
||||
"version": "4.0.2",
|
||||
"from": "replacestream@4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"from": "safe-buffer@5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"from": "sprintf-js@>=1.0.2 <1.1.0",
|
||||
"from": "sprintf-js@https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
|
||||
},
|
||||
"string": {
|
||||
"version": "3.3.1",
|
||||
"from": "string@>=3.0.1 <4.0.0",
|
||||
"from": "string@https://registry.npmjs.org/string/-/string-3.3.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/string/-/string-3.3.1.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.3",
|
||||
"from": "string_decoder@1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"textextensions": {
|
||||
"version": "1.0.2",
|
||||
"from": "textextensions@1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"uc.micro": {
|
||||
"version": "1.0.3",
|
||||
"from": "uc.micro@>=1.0.3 <2.0.0",
|
||||
"from": "uc.micro@https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.3.tgz"
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"from": "util-deprecate@1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"vscode-extension-telemetry": {
|
||||
"version": "0.0.7",
|
||||
"from": "vscode-extension-telemetry@>=0.0.8 <0.0.9",
|
||||
"version": "0.0.8",
|
||||
"from": "vscode-extension-telemetry@https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz",
|
||||
"resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.8.tgz"
|
||||
},
|
||||
"vscode-nls": {
|
||||
"version": "2.0.2",
|
||||
"from": "vscode-nls@>=2.0.1 <3.0.0",
|
||||
"from": "vscode-nls@https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
|
||||
},
|
||||
"winreg": {
|
||||
"version": "1.2.3",
|
||||
"from": "winreg@1.2.3",
|
||||
"from": "winreg@https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,52 @@
|
||||
{
|
||||
"language": "markdown",
|
||||
"scopeName": "text.html.markdown",
|
||||
"path": "./syntaxes/markdown.tmLanguage"
|
||||
"path": "./syntaxes/markdown.tmLanguage",
|
||||
"embeddedLanguages": {
|
||||
"meta.embedded.block.html": "html",
|
||||
"source.js": "javascript",
|
||||
"source.css": "css",
|
||||
"meta.embedded.block.frontmatter": "yaml",
|
||||
"meta.embedded.block.css": "css",
|
||||
"meta.embedded.block.ini": "ini",
|
||||
"meta.embedded.block.java": "java",
|
||||
"meta.embedded.block.lua": "lua",
|
||||
"meta.embedded.block.makefile": "makefile",
|
||||
"meta.embedded.block.perl": "perl",
|
||||
"meta.embedded.block.r": "r",
|
||||
"meta.embedded.block.ruby": "ruby",
|
||||
"meta.embedded.block.php": "php",
|
||||
"meta.embedded.block.sql": "sql",
|
||||
"meta.embedded.block.vs_net": "vs_net",
|
||||
"meta.embedded.block.xml": "xml",
|
||||
"meta.embedded.block.xsl": "xsl",
|
||||
"meta.embedded.block.yaml": "yaml",
|
||||
"meta.embedded.block.dosbatch": "dosbatch",
|
||||
"meta.embedded.block.clojure": "clojure",
|
||||
"meta.embedded.block.coffee": "coffee",
|
||||
"meta.embedded.block.c": "c",
|
||||
"meta.embedded.block.cpp": "cpp",
|
||||
"meta.embedded.block.diff": "diff",
|
||||
"meta.embedded.block.dockerfile": "dockerfile",
|
||||
"meta.embedded.block.go": "go",
|
||||
"meta.embedded.block.groovy": "groovy",
|
||||
"meta.embedded.block.jade": "jade",
|
||||
"meta.embedded.block.javascript": "javascript",
|
||||
"meta.embedded.block.json": "json",
|
||||
"meta.embedded.block.less": "less",
|
||||
"meta.embedded.block.objc": "objc",
|
||||
"meta.embedded.block.scss": "scss",
|
||||
"meta.embedded.block.perl6": "perl6",
|
||||
"meta.embedded.block.powershell": "powershell",
|
||||
"meta.embedded.block.python": "python",
|
||||
"meta.embedded.block.rust": "rust",
|
||||
"meta.embedded.block.scala": "scala",
|
||||
"meta.embedded.block.shellscript": "shellscript",
|
||||
"meta.embedded.block.typescript": "typescript",
|
||||
"meta.embedded.block.typescriptreact": "typescriptreact",
|
||||
"meta.embedded.block.csharp": "csharp",
|
||||
"meta.embedded.block.fsharp": "fsharp"
|
||||
}
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
@@ -131,6 +176,10 @@
|
||||
{
|
||||
"command": "markdown.showPreviewSecuritySelector",
|
||||
"when": "editorLangId == markdown"
|
||||
},
|
||||
{
|
||||
"command": "markdown.showPreviewSecuritySelector",
|
||||
"when": "resourceScheme == markdown"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -162,7 +211,8 @@
|
||||
"markdown.styles": {
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"description": "%markdown.styles.dec%"
|
||||
"description": "%markdown.styles.dec%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.previewFrontMatter": {
|
||||
"type": "string",
|
||||
@@ -171,52 +221,62 @@
|
||||
"show"
|
||||
],
|
||||
"default": "hide",
|
||||
"description": "%markdown.previewFrontMatter.dec%"
|
||||
"description": "%markdown.previewFrontMatter.dec%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.breaks": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "%markdown.preview.breaks.desc%"
|
||||
"description": "%markdown.preview.breaks.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.linkify": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%markdown.preview.linkify%"
|
||||
"description": "%markdown.preview.linkify%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.fontFamily": {
|
||||
"type": "string",
|
||||
"default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif",
|
||||
"description": "%markdown.preview.fontFamily.desc%"
|
||||
"description": "%markdown.preview.fontFamily.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.fontSize": {
|
||||
"type": "number",
|
||||
"default": 14,
|
||||
"description": "%markdown.preview.fontSize.desc%"
|
||||
"description": "%markdown.preview.fontSize.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.lineHeight": {
|
||||
"type": "number",
|
||||
"default": 1.6,
|
||||
"description": "%markdown.preview.lineHeight.desc%"
|
||||
"description": "%markdown.preview.lineHeight.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.scrollPreviewWithEditorSelection": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%markdown.preview.scrollPreviewWithEditorSelection.desc%"
|
||||
"description": "%markdown.preview.scrollPreviewWithEditorSelection.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.markEditorSelection": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%markdown.preview.markEditorSelection.desc%"
|
||||
"description": "%markdown.preview.markEditorSelection.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.scrollEditorWithPreview": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%markdown.preview.scrollEditorWithPreview.desc%"
|
||||
"description": "%markdown.preview.scrollEditorWithPreview.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.preview.doubleClickToSwitchToEditor": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "%markdown.preview.doubleClickToSwitchToEditor.desc%"
|
||||
"description": "%markdown.preview.doubleClickToSwitchToEditor.desc%",
|
||||
"scope": "resource"
|
||||
},
|
||||
"markdown.trace": {
|
||||
"type": "string",
|
||||
@@ -225,7 +285,8 @@
|
||||
"verbose"
|
||||
],
|
||||
"default": "off",
|
||||
"description": "%markdown.trace.desc%"
|
||||
"description": "%markdown.trace.desc%",
|
||||
"scope": "window"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -234,7 +295,13 @@
|
||||
"editor.wordWrap": "on",
|
||||
"editor.quickSuggestions": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsonValidation": [
|
||||
{
|
||||
"fileMatch": "package.json",
|
||||
"url": "./schemas/package.schema.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:markdown ./tsconfig.json",
|
||||
@@ -242,15 +309,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"highlight.js": "9.5.0",
|
||||
"markdown-it": "8.2.2",
|
||||
"markdown-it": "^8.4.0",
|
||||
"markdown-it-named-headers": "0.0.4",
|
||||
"vscode-extension-telemetry": "0.0.8",
|
||||
"vscode-nls": "2.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/highlight.js": "^9.1.9",
|
||||
"@types/highlight.js": "9.1.10",
|
||||
"@types/markdown-it": "0.0.2",
|
||||
"@types/node": "^7.0.4",
|
||||
"@types/node": "8.0.33",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^0.5.4"
|
||||
}
|
||||
|
||||
32
extensions/markdown/schemas/package.schema.json
Normal file
32
extensions/markdown/schemas/package.schema.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"title": "Markdown contributions to package.json",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contributes": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"markdown.previewStyles": {
|
||||
"type": "array",
|
||||
"description": "Contributed CSS files that change the look or layout of the Markdown preview",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "Extension relative path to a css file"
|
||||
}
|
||||
},
|
||||
"markdown.previewScripts": {
|
||||
"type": "array",
|
||||
"description": "Contributed scripts that are executed in the Markdown preview",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "Extension relative path to a JavaScript file"
|
||||
}
|
||||
},
|
||||
"markdown.markdownItPlugins": {
|
||||
"type": "boolean",
|
||||
"description": "Does this extension contribute a markdown-it plugin?"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,20 +8,61 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
|
||||
export default class MarkdownDocumentLinkProvider implements vscode.DocumentLinkProvider {
|
||||
function normalizeLink(document: vscode.TextDocument, link: string, base: string): vscode.Uri {
|
||||
const uri = vscode.Uri.parse(link);
|
||||
if (uri.scheme) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
private _linkPattern = /(\[[^\]]*\]\(\s*?)(((((?=.*\)\)+)|(?=.*\)\]+))[^\s\)]+?)|([^\s]+)))\)/g;
|
||||
// assume it must be a file
|
||||
let resourcePath = uri.path;
|
||||
if (!uri.path) {
|
||||
resourcePath = document.uri.path;
|
||||
} else if (uri.path[0] === '/') {
|
||||
const root = vscode.workspace.getWorkspaceFolder(document.uri);
|
||||
if (root) {
|
||||
resourcePath = path.join(root.uri.fsPath, uri.path);
|
||||
}
|
||||
} else {
|
||||
resourcePath = path.join(base, uri.path);
|
||||
}
|
||||
|
||||
constructor() { }
|
||||
return vscode.Uri.parse(`command:_markdown.openDocumentLink?${encodeURIComponent(JSON.stringify({ fragment: uri.fragment, path: resourcePath }))}`);
|
||||
}
|
||||
|
||||
public provideDocumentLinks(document: vscode.TextDocument, _token: vscode.CancellationToken): vscode.DocumentLink[] {
|
||||
const results: vscode.DocumentLink[] = [];
|
||||
function matchAll(pattern: RegExp, text: string): Array<RegExpMatchArray> {
|
||||
const out: RegExpMatchArray[] = [];
|
||||
pattern.lastIndex = 0;
|
||||
let match: RegExpMatchArray | null;
|
||||
while ((match = pattern.exec(text))) {
|
||||
out.push(match);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
export default class LinkProvider implements vscode.DocumentLinkProvider {
|
||||
private linkPattern = /(\[[^\]]*\]\(\s*?)(((((?=.*\)\)+)|(?=.*\)\]+))[^\s\)]+?)|([^\s]+)))\)/g;
|
||||
private referenceLinkPattern = /(\[([^\]]+)\]\[\s*?)([^\s\]]*?)\]/g;
|
||||
private definitionPattern = /^([\t ]*\[([^\]]+)\]:\s*)(\S+)/gm;
|
||||
|
||||
public provideDocumentLinks(
|
||||
document: vscode.TextDocument,
|
||||
_token: vscode.CancellationToken
|
||||
): vscode.DocumentLink[] {
|
||||
const base = path.dirname(document.uri.fsPath);
|
||||
const text = document.getText();
|
||||
|
||||
this._linkPattern.lastIndex = 0;
|
||||
let match: RegExpMatchArray | null;
|
||||
while ((match = this._linkPattern.exec(text))) {
|
||||
return this.providerInlineLinks(text, document, base)
|
||||
.concat(this.provideReferenceLinks(text, document, base));
|
||||
}
|
||||
|
||||
private providerInlineLinks(
|
||||
text: string,
|
||||
document: vscode.TextDocument,
|
||||
base: string
|
||||
): vscode.DocumentLink[] {
|
||||
const results: vscode.DocumentLink[] = [];
|
||||
for (const match of matchAll(this.linkPattern, text)) {
|
||||
const pre = match[1];
|
||||
const link = match[2];
|
||||
const offset = (match.index || 0) + pre.length;
|
||||
@@ -30,7 +71,7 @@ export default class MarkdownDocumentLinkProvider implements vscode.DocumentLink
|
||||
try {
|
||||
results.push(new vscode.DocumentLink(
|
||||
new vscode.Range(linkStart, linkEnd),
|
||||
this.normalizeLink(document, link, base)));
|
||||
normalizeLink(document, link, base)));
|
||||
} catch (e) {
|
||||
// noop
|
||||
}
|
||||
@@ -39,25 +80,73 @@ export default class MarkdownDocumentLinkProvider implements vscode.DocumentLink
|
||||
return results;
|
||||
}
|
||||
|
||||
private normalizeLink(document: vscode.TextDocument, link: string, base: string): vscode.Uri {
|
||||
const uri = vscode.Uri.parse(link);
|
||||
if (uri.scheme) {
|
||||
return uri;
|
||||
}
|
||||
private provideReferenceLinks(
|
||||
text: string,
|
||||
document: vscode.TextDocument,
|
||||
base: string
|
||||
): vscode.DocumentLink[] {
|
||||
const results: vscode.DocumentLink[] = [];
|
||||
|
||||
// assume it must be a file
|
||||
let resourcePath = uri.path;
|
||||
if (!uri.path) {
|
||||
resourcePath = document.uri.path;
|
||||
} else if (uri.path[0] === '/') {
|
||||
const root = vscode.workspace.getWorkspaceFolder(document.uri);
|
||||
if (root) {
|
||||
resourcePath = path.join(root.uri.fsPath, uri.path);
|
||||
const definitions = this.getDefinitions(text, document);
|
||||
for (const match of matchAll(this.referenceLinkPattern, text)) {
|
||||
let linkStart: vscode.Position;
|
||||
let linkEnd: vscode.Position;
|
||||
let reference = match[3];
|
||||
if (reference) { // [text][ref]
|
||||
const pre = match[1];
|
||||
const offset = (match.index || 0) + pre.length;
|
||||
linkStart = document.positionAt(offset);
|
||||
linkEnd = document.positionAt(offset + reference.length);
|
||||
} else if (match[2]) { // [ref][]
|
||||
reference = match[2];
|
||||
const offset = (match.index || 0) + 1;
|
||||
linkStart = document.positionAt(offset);
|
||||
linkEnd = document.positionAt(offset + match[2].length);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
const link = definitions.get(reference);
|
||||
if (link) {
|
||||
results.push(new vscode.DocumentLink(
|
||||
new vscode.Range(linkStart, linkEnd),
|
||||
vscode.Uri.parse(`command:_markdown.moveCursorToPosition?${encodeURIComponent(JSON.stringify([link.linkRange.start.line, link.linkRange.start.character]))}`)));
|
||||
}
|
||||
} catch (e) {
|
||||
// noop
|
||||
}
|
||||
} else {
|
||||
resourcePath = path.join(base, uri.path);
|
||||
}
|
||||
|
||||
return vscode.Uri.parse(`command:_markdown.openDocumentLink?${encodeURIComponent(JSON.stringify({ fragment: uri.fragment, path: resourcePath }))}`);
|
||||
for (const definition of Array.from(definitions.values())) {
|
||||
try {
|
||||
results.push(new vscode.DocumentLink(
|
||||
definition.linkRange,
|
||||
normalizeLink(document, definition.link, base)));
|
||||
} catch (e) {
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
private getDefinitions(text: string, document: vscode.TextDocument) {
|
||||
const out = new Map<string, { link: string, linkRange: vscode.Range }>();
|
||||
for (const match of matchAll(this.definitionPattern, text)) {
|
||||
const pre = match[1];
|
||||
const reference = match[2];
|
||||
const link = match[3].trim();
|
||||
|
||||
const offset = (match.index || 0) + pre.length;
|
||||
const linkStart = document.positionAt(offset);
|
||||
const linkEnd = document.positionAt(offset + link.length);
|
||||
|
||||
out.set(reference, {
|
||||
link: link,
|
||||
linkRange: new vscode.Range(linkStart, linkEnd)
|
||||
});
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import * as vscode from 'vscode';
|
||||
import * as path from 'path';
|
||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||
import { MarkdownEngine } from './markdownEngine';
|
||||
import DocumentLinkProvider from './documentLinkProvider';
|
||||
import LinkProvider from './documentLinkProvider';
|
||||
import MDDocumentSymbolProvider from './documentSymbolProvider';
|
||||
import { ExtensionContentSecurityPolicyArbiter, PreviewSecuritySelector } from './security';
|
||||
import { MDDocumentContentProvider, getMarkdownUri, isMarkdownFile } from './previewContentProvider';
|
||||
@@ -96,18 +96,28 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
const symbolsProviderRegistration = vscode.languages.registerDocumentSymbolProvider({ language: 'markdown' }, symbolsProvider);
|
||||
context.subscriptions.push(contentProviderRegistration, symbolsProviderRegistration);
|
||||
|
||||
context.subscriptions.push(vscode.languages.registerDocumentLinkProvider('markdown', new DocumentLinkProvider()));
|
||||
context.subscriptions.push(vscode.languages.registerDocumentLinkProvider('markdown', new LinkProvider()));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreview', (uri) => showPreview(cspArbiter, uri, false)));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('markdown.showPreviewToSide', uri => showPreview(cspArbiter, uri, true)));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('markdown.showSource', showSource));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('_markdown.moveCursorToPosition', (line: number, character: number) => {
|
||||
if (!vscode.window.activeTextEditor) {
|
||||
return;
|
||||
}
|
||||
const position = new vscode.Position(line, character);
|
||||
const selection = new vscode.Selection(position, position);
|
||||
vscode.window.activeTextEditor.revealRange(selection);
|
||||
vscode.window.activeTextEditor.selection = selection;
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('_markdown.revealLine', (uri, line) => {
|
||||
const sourceUri = vscode.Uri.parse(decodeURIComponent(uri));
|
||||
logger.log('revealLine', { uri, sourceUri: sourceUri.toString(), line });
|
||||
|
||||
vscode.window.visibleTextEditors
|
||||
.filter(editor => isMarkdownFile(editor.document) && editor.document.uri.fsPath === sourceUri.fsPath)
|
||||
.filter(editor => isMarkdownFile(editor.document) && editor.document.uri.toString() === sourceUri.toString())
|
||||
.forEach(editor => {
|
||||
const sourceLine = Math.floor(line);
|
||||
const fraction = line - sourceLine;
|
||||
@@ -243,13 +253,19 @@ function showPreview(cspArbiter: ExtensionContentSecurityPolicyArbiter, uri?: vs
|
||||
const thenable = vscode.commands.executeCommand('vscode.previewHtml',
|
||||
getMarkdownUri(resource),
|
||||
getViewColumn(sideBySide),
|
||||
`Preview '${path.basename(resource.fsPath)}'`,
|
||||
localize('previewTitle', 'Preview {0}', path.basename(resource.fsPath)),
|
||||
{
|
||||
allowScripts: true,
|
||||
allowSvgs: cspArbiter.shouldAllowSvgsForResource(resource)
|
||||
});
|
||||
|
||||
if (telemetryReporter) {
|
||||
/* __GDPR__
|
||||
"openPreview" : {
|
||||
"where" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"how": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
telemetryReporter.sendTelemetryEvent('openPreview', {
|
||||
where: sideBySide ? 'sideBySide' : 'inPlace',
|
||||
how: (uri instanceof vscode.Uri) ? 'action' : 'pallete'
|
||||
@@ -286,7 +302,7 @@ function showSource(mdUri: vscode.Uri) {
|
||||
|
||||
const docUri = vscode.Uri.parse(mdUri.query);
|
||||
for (const editor of vscode.window.visibleTextEditors) {
|
||||
if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.fsPath === docUri.fsPath) {
|
||||
if (editor.document.uri.scheme === docUri.scheme && editor.document.uri.toString() === docUri.toString()) {
|
||||
return vscode.window.showTextDocument(editor.document, editor.viewColumn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export class MarkdownEngine {
|
||||
}
|
||||
}
|
||||
|
||||
private async getEngine(): Promise<MarkdownIt> {
|
||||
private async getEngine(resource: vscode.Uri): Promise<MarkdownIt> {
|
||||
if (!this.md) {
|
||||
const hljs = await import('highlight.js');
|
||||
const mdnh = await import('markdown-it-named-headers');
|
||||
@@ -66,10 +66,10 @@ export class MarkdownEngine {
|
||||
this.addLinkValidator(this.md);
|
||||
}
|
||||
|
||||
const config = vscode.workspace.getConfiguration('markdown');
|
||||
const config = vscode.workspace.getConfiguration('markdown', resource);
|
||||
this.md.set({
|
||||
breaks: config.get('preview.breaks', false),
|
||||
linkify: config.get('preview.linkify', true)
|
||||
breaks: config.get<boolean>('preview.breaks', false),
|
||||
linkify: config.get<boolean>('preview.linkify', true)
|
||||
});
|
||||
return this.md;
|
||||
}
|
||||
@@ -94,14 +94,14 @@ export class MarkdownEngine {
|
||||
}
|
||||
this.currentDocument = document;
|
||||
this.firstLine = offset;
|
||||
const engine = await this.getEngine();
|
||||
const engine = await this.getEngine(document);
|
||||
return engine.render(text);
|
||||
}
|
||||
|
||||
public async parse(document: vscode.Uri, source: string): Promise<Token[]> {
|
||||
const { text, offset } = this.stripFrontmatter(source);
|
||||
this.currentDocument = document;
|
||||
const engine = await this.getEngine();
|
||||
const engine = await this.getEngine(document);
|
||||
|
||||
return engine.parse(text, {}).map(token => {
|
||||
if (token.map) {
|
||||
|
||||
@@ -38,8 +38,8 @@ export function getMarkdownUri(uri: vscode.Uri) {
|
||||
}
|
||||
|
||||
class MarkdownPreviewConfig {
|
||||
public static getCurrentConfig() {
|
||||
return new MarkdownPreviewConfig();
|
||||
public static getConfigForResource(resource: vscode.Uri) {
|
||||
return new MarkdownPreviewConfig(resource);
|
||||
}
|
||||
|
||||
public readonly scrollBeyondLastLine: boolean;
|
||||
@@ -56,9 +56,9 @@ class MarkdownPreviewConfig {
|
||||
public readonly fontFamily: string | undefined;
|
||||
public readonly styles: string[];
|
||||
|
||||
private constructor() {
|
||||
const editorConfig = vscode.workspace.getConfiguration('editor');
|
||||
const markdownConfig = vscode.workspace.getConfiguration('markdown');
|
||||
private constructor(resource: vscode.Uri) {
|
||||
const editorConfig = vscode.workspace.getConfiguration('editor', resource);
|
||||
const markdownConfig = vscode.workspace.getConfiguration('markdown', resource);
|
||||
const markdownEditorConfig = vscode.workspace.getConfiguration('[markdown]');
|
||||
|
||||
this.scrollBeyondLastLine = editorConfig.get<boolean>('scrollBeyondLastLine', false);
|
||||
@@ -107,11 +107,41 @@ class MarkdownPreviewConfig {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
class PreviewConfigManager {
|
||||
private previewConfigurationsForWorkspaces = new Map<string, MarkdownPreviewConfig>();
|
||||
|
||||
public loadAndCacheConfiguration(
|
||||
resource: vscode.Uri
|
||||
) {
|
||||
const config = MarkdownPreviewConfig.getConfigForResource(resource);
|
||||
this.previewConfigurationsForWorkspaces.set(this.getKey(resource), config);
|
||||
return config;
|
||||
}
|
||||
|
||||
public shouldUpdateConfiguration(
|
||||
resource: vscode.Uri
|
||||
): boolean {
|
||||
const key = this.getKey(resource);
|
||||
const currentConfig = this.previewConfigurationsForWorkspaces.get(key);
|
||||
const newConfig = MarkdownPreviewConfig.getConfigForResource(resource);
|
||||
return (!currentConfig || !currentConfig.isEqualTo(newConfig));
|
||||
}
|
||||
|
||||
private getKey(
|
||||
resource: vscode.Uri
|
||||
): string {
|
||||
const folder = vscode.workspace.getWorkspaceFolder(resource);
|
||||
if (!folder) {
|
||||
return '';
|
||||
}
|
||||
return folder.uri.toString();
|
||||
}
|
||||
}
|
||||
|
||||
export class MDDocumentContentProvider implements vscode.TextDocumentContentProvider {
|
||||
private _onDidChange = new vscode.EventEmitter<vscode.Uri>();
|
||||
private _waiting: boolean = false;
|
||||
|
||||
private config: MarkdownPreviewConfig;
|
||||
private previewConfigurations = new PreviewConfigManager();
|
||||
|
||||
private extraStyles: Array<vscode.Uri> = [];
|
||||
private extraScripts: Array<vscode.Uri> = [];
|
||||
@@ -121,9 +151,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
private context: vscode.ExtensionContext,
|
||||
private cspArbiter: ContentSecurityPolicyArbiter,
|
||||
private logger: Logger
|
||||
) {
|
||||
this.config = MarkdownPreviewConfig.getCurrentConfig();
|
||||
}
|
||||
) { }
|
||||
|
||||
public addScript(resource: vscode.Uri): void {
|
||||
this.extraScripts.push(resource);
|
||||
@@ -163,34 +191,34 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
return vscode.Uri.file(path.join(path.dirname(resource.fsPath), href)).toString();
|
||||
}
|
||||
|
||||
private computeCustomStyleSheetIncludes(uri: vscode.Uri): string {
|
||||
if (this.config.styles && Array.isArray(this.config.styles)) {
|
||||
return this.config.styles.map((style) => {
|
||||
return `<link rel="stylesheet" class="code-user-style" data-source="${style.replace(/"/g, '"')}" href="${this.fixHref(uri, style)}" type="text/css" media="screen">`;
|
||||
private computeCustomStyleSheetIncludes(resource: vscode.Uri, config: MarkdownPreviewConfig): string {
|
||||
if (config.styles && Array.isArray(config.styles)) {
|
||||
return config.styles.map(style => {
|
||||
return `<link rel="stylesheet" class="code-user-style" data-source="${style.replace(/"/g, '"')}" href="${this.fixHref(resource, style)}" type="text/css" media="screen">`;
|
||||
}).join('\n');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
private getSettingsOverrideStyles(nonce: string): string {
|
||||
private getSettingsOverrideStyles(nonce: string, config: MarkdownPreviewConfig): string {
|
||||
return `<style nonce="${nonce}">
|
||||
body {
|
||||
${this.config.fontFamily ? `font-family: ${this.config.fontFamily};` : ''}
|
||||
${isNaN(this.config.fontSize) ? '' : `font-size: ${this.config.fontSize}px;`}
|
||||
${isNaN(this.config.lineHeight) ? '' : `line-height: ${this.config.lineHeight};`}
|
||||
${config.fontFamily ? `font-family: ${config.fontFamily};` : ''}
|
||||
${isNaN(config.fontSize) ? '' : `font-size: ${config.fontSize}px;`}
|
||||
${isNaN(config.lineHeight) ? '' : `line-height: ${config.lineHeight};`}
|
||||
}
|
||||
</style>`;
|
||||
}
|
||||
|
||||
private getStyles(resource: vscode.Uri, nonce: string): string {
|
||||
private getStyles(resource: vscode.Uri, nonce: string, config: MarkdownPreviewConfig): string {
|
||||
const baseStyles = [
|
||||
this.getMediaPath('markdown.css'),
|
||||
this.getMediaPath('tomorrow.css')
|
||||
].concat(this.extraStyles.map(resource => resource.toString()));
|
||||
|
||||
return `${baseStyles.map(href => `<link rel="stylesheet" type="text/css" href="${href}">`).join('\n')}
|
||||
${this.getSettingsOverrideStyles(nonce)}
|
||||
${this.computeCustomStyleSheetIncludes(resource)}`;
|
||||
${this.getSettingsOverrideStyles(nonce, config)}
|
||||
${this.computeCustomStyleSheetIncludes(resource, config)}`;
|
||||
}
|
||||
|
||||
private getScripts(nonce: string): string {
|
||||
@@ -205,20 +233,20 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
|
||||
let initialLine: number | undefined = undefined;
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor && editor.document.uri.fsPath === sourceUri.fsPath) {
|
||||
if (editor && editor.document.uri.toString() === sourceUri.toString()) {
|
||||
initialLine = editor.selection.active.line;
|
||||
}
|
||||
|
||||
const document = await vscode.workspace.openTextDocument(sourceUri);
|
||||
this.config = MarkdownPreviewConfig.getCurrentConfig();
|
||||
const config = this.previewConfigurations.loadAndCacheConfiguration(sourceUri);
|
||||
|
||||
const initialData = {
|
||||
previewUri: uri.toString(),
|
||||
source: sourceUri.toString(),
|
||||
line: initialLine,
|
||||
scrollPreviewWithEditorSelection: this.config.scrollPreviewWithEditorSelection,
|
||||
scrollEditorWithPreview: this.config.scrollEditorWithPreview,
|
||||
doubleClickToSwitchToEditor: this.config.doubleClickToSwitchToEditor
|
||||
scrollPreviewWithEditorSelection: config.scrollPreviewWithEditorSelection,
|
||||
scrollEditorWithPreview: config.scrollEditorWithPreview,
|
||||
doubleClickToSwitchToEditor: config.doubleClickToSwitchToEditor
|
||||
};
|
||||
|
||||
this.logger.log('provideTextDocumentContent', initialData);
|
||||
@@ -227,7 +255,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
const nonce = new Date().getTime() + '' + new Date().getMilliseconds();
|
||||
const csp = this.getCspForResource(sourceUri, nonce);
|
||||
|
||||
const body = await this.engine.render(sourceUri, this.config.previewFrontMatter === 'hide', document.getText());
|
||||
const body = await this.engine.render(sourceUri, config.previewFrontMatter === 'hide', document.getText());
|
||||
return `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -236,10 +264,10 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
<meta id="vscode-markdown-preview-data" data-settings="${JSON.stringify(initialData).replace(/"/g, '"')}" data-strings="${JSON.stringify(previewStrings).replace(/"/g, '"')}">
|
||||
<script src="${this.getMediaPath('csp.js')}" nonce="${nonce}"></script>
|
||||
<script src="${this.getMediaPath('loading.js')}" nonce="${nonce}"></script>
|
||||
${this.getStyles(sourceUri, nonce)}
|
||||
${this.getStyles(sourceUri, nonce, config)}
|
||||
<base href="${document.uri.toString(true)}">
|
||||
</head>
|
||||
<body class="vscode-body ${this.config.scrollBeyondLastLine ? 'scrollBeyondLastLine' : ''} ${this.config.wordWrap ? 'wordWrap' : ''} ${this.config.markEditorSelection ? 'showEditorSelection' : ''}">
|
||||
<body class="vscode-body ${config.scrollBeyondLastLine ? 'scrollBeyondLastLine' : ''} ${config.wordWrap ? 'wordWrap' : ''} ${config.markEditorSelection ? 'showEditorSelection' : ''}">
|
||||
${body}
|
||||
<div class="code-line" data-line="${document.lineCount}"></div>
|
||||
${this.getScripts(nonce)}
|
||||
@@ -248,12 +276,11 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv
|
||||
}
|
||||
|
||||
public updateConfiguration() {
|
||||
const newConfig = MarkdownPreviewConfig.getCurrentConfig();
|
||||
if (!this.config.isEqualTo(newConfig)) {
|
||||
this.config = newConfig;
|
||||
// update all generated md documents
|
||||
for (const document of vscode.workspace.textDocuments) {
|
||||
if (document.uri.scheme === 'markdown') {
|
||||
// update all generated md documents
|
||||
for (const document of vscode.workspace.textDocuments) {
|
||||
if (document.uri.scheme === 'markdown') {
|
||||
const sourceUri = vscode.Uri.parse(document.uri.query);
|
||||
if (this.previewConfigurations.shouldUpdateConfiguration(sourceUri)) {
|
||||
this.update(document.uri);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class TableOfContentsProvider {
|
||||
}
|
||||
|
||||
private static getHeaderText(header: string): string {
|
||||
return header.replace(/^\s*#+\s*(.*?)\s*\1*$/, (_, word) => `${word.trim()}`);
|
||||
return header.replace(/^\s*#+\s*(.*?)\s*#*$/, (_, word) => word.trim());
|
||||
}
|
||||
|
||||
public static slugify(header: string): string {
|
||||
|
||||
@@ -1,64 +1,69 @@
|
||||
// @ts-check
|
||||
|
||||
var gulp = require('gulp');
|
||||
var util = require("gulp-util");
|
||||
var replace = require('gulp-replace');
|
||||
var rename = require('gulp-rename');
|
||||
|
||||
const languages = [
|
||||
{ name: 'css', identifiers: ['css', 'css.erb'], source: 'source.css' },
|
||||
{ name: 'basic', identifiers: ['html', 'htm', 'shtml', 'xhtml', 'inc', 'tmpl', 'tpl'], source: 'text.html.basic' },
|
||||
{ name: 'ini', identifiers: ['ini', 'conf'], source: 'source.ini' },
|
||||
{ name: 'java', identifiers: ['java', 'bsh'], source: 'source.java' },
|
||||
{ name: 'lua', identifiers: ['lua'], source: 'source.lua' },
|
||||
{ name: 'makefile', identifiers: ['Makefile', 'makefile', 'GNUmakefile', 'OCamlMakefile'], source: 'source.makefile' },
|
||||
{ name: 'perl', identifiers: ['perl', 'pl', 'pm', 'pod', 't', 'PL', 'psgi', 'vcl'], source: 'source.perl' },
|
||||
{ name: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile'], source: 'source.r' },
|
||||
{ name: 'ruby', identifiers: ['ruby', 'rb', 'rbx', 'rjs', 'Rakefile', 'rake', 'cgi', 'fcgi', 'gemspec', 'irbrc', 'Capfile', 'ru', 'prawn', 'Cheffile', 'Gemfile', 'Guardfile', 'Hobofile', 'Vagrantfile', 'Appraisals', 'Rantfile', 'Berksfile', 'Berksfile.lock', 'Thorfile', 'Puppetfile'], source: 'source.ruby' },
|
||||
{ name: 'css', language: 'css', identifiers: ['css', 'css.erb'], source: 'source.css' },
|
||||
{ name: 'basic', language: 'html', identifiers: ['html', 'htm', 'shtml', 'xhtml', 'inc', 'tmpl', 'tpl'], source: 'text.html.basic' },
|
||||
{ name: 'ini', language: 'ini', identifiers: ['ini', 'conf'], source: 'source.ini' },
|
||||
{ name: 'java', language: 'java', identifiers: ['java', 'bsh'], source: 'source.java' },
|
||||
{ name: 'lua', language: 'lua', identifiers: ['lua'], source: 'source.lua' },
|
||||
{ name: 'makefile', language: 'makefile', identifiers: ['Makefile', 'makefile', 'GNUmakefile', 'OCamlMakefile'], source: 'source.makefile' },
|
||||
{ name: 'perl', language: 'perl', identifiers: ['perl', 'pl', 'pm', 'pod', 't', 'PL', 'psgi', 'vcl'], source: 'source.perl' },
|
||||
{ name: 'r', language: 'r', identifiers: ['R', 'r', 's', 'S', 'Rprofile'], source: 'source.r' },
|
||||
{ name: 'ruby', language: 'ruby', identifiers: ['ruby', 'rb', 'rbx', 'rjs', 'Rakefile', 'rake', 'cgi', 'fcgi', 'gemspec', 'irbrc', 'Capfile', 'ru', 'prawn', 'Cheffile', 'Gemfile', 'Guardfile', 'Hobofile', 'Vagrantfile', 'Appraisals', 'Rantfile', 'Berksfile', 'Berksfile.lock', 'Thorfile', 'Puppetfile'], source: 'source.ruby' },
|
||||
// Left to its own devices, the PHP grammar will match HTML as a combination of operators
|
||||
// and constants. Therefore, HTML must take precedence over PHP in order to get proper
|
||||
// syntax highlighting.
|
||||
{ name: 'php', identifiers: ['php', 'php3', 'php4', 'php5', 'phpt', 'phtml', 'aw', 'ctp'], source: ['text.html.basic', 'text.html.php#language'] },
|
||||
{ name: 'sql', identifiers: ['sql', 'ddl', 'dml'], source: 'source.sql' },
|
||||
{ name: 'vs_net', identifiers: ['vb'], source: 'source.asp.vb.net' },
|
||||
{ name: 'xml', identifiers: ['xml', 'xsd', 'tld', 'jsp', 'pt', 'cpt', 'dtml', 'rss', 'opml'], source: 'text.xml' },
|
||||
{ name: 'xsl', identifiers: ['xsl', 'xslt'], source: 'text.xml.xsl' },
|
||||
{ name: 'yaml', identifiers: ['yaml', 'yml'], source: 'source.yaml' },
|
||||
{ name: 'dosbatch', identifiers: ['bat', 'batch'], source: 'source.dosbatch' },
|
||||
{ name: 'clojure', identifiers: ['clj', 'cljs', 'clojure'], source: 'source.clojure' },
|
||||
{ name: 'coffee', identifiers: ['coffee', 'Cakefile', 'coffee.erb'], source: 'source.coffee' },
|
||||
{ name: 'c', identifiers: ['c', 'h'], source: 'source.c' },
|
||||
{ name: 'cpp', identifiers: ['cpp', 'c\\+\\+', 'cxx'], source: 'source.cpp' },
|
||||
{ name: 'diff', identifiers: ['patch', 'diff', 'rej'], source: 'source.diff' },
|
||||
{ name: 'dockerfile', identifiers: ['dockerfile', 'Dockerfile'], source: 'source.dockerfile' },
|
||||
{ name: 'php', language: 'php', identifiers: ['php', 'php3', 'php4', 'php5', 'phpt', 'phtml', 'aw', 'ctp'], source: ['text.html.basic', 'text.html.php#language'] },
|
||||
{ name: 'sql', language: 'sql', identifiers: ['sql', 'ddl', 'dml'], source: 'source.sql' },
|
||||
{ name: 'vs_net', language: 'vs_net', identifiers: ['vb'], source: 'source.asp.vb.net' },
|
||||
{ name: 'xml', language: 'xml', identifiers: ['xml', 'xsd', 'tld', 'jsp', 'pt', 'cpt', 'dtml', 'rss', 'opml'], source: 'text.xml' },
|
||||
{ name: 'xsl', language: 'xsl', identifiers: ['xsl', 'xslt'], source: 'text.xml.xsl' },
|
||||
{ name: 'yaml', language: 'yaml', identifiers: ['yaml', 'yml'], source: 'source.yaml' },
|
||||
{ name: 'dosbatch', language: 'dosbatch', identifiers: ['bat', 'batch'], source: 'source.dosbatch' },
|
||||
{ name: 'clojure', language: 'clojure', identifiers: ['clj', 'cljs', 'clojure'], source: 'source.clojure' },
|
||||
{ name: 'coffee', language: 'coffee', identifiers: ['coffee', 'Cakefile', 'coffee.erb'], source: 'source.coffee' },
|
||||
{ name: 'c', language: 'c', identifiers: ['c', 'h'], source: 'source.c' },
|
||||
{ name: 'cpp', language: 'cpp', identifiers: ['cpp', 'c\\+\\+', 'cxx'], source: 'source.cpp' },
|
||||
{ name: 'diff', language: 'diff', identifiers: ['patch', 'diff', 'rej'], source: 'source.diff' },
|
||||
{ name: 'dockerfile', language: 'dockerfile', identifiers: ['dockerfile', 'Dockerfile'], source: 'source.dockerfile' },
|
||||
{ name: 'git_commit', identifiers: ['COMMIT_EDITMSG', 'MERGE_MSG'], source: 'text.git-commit' },
|
||||
{ name: 'git_rebase', identifiers: ['git-rebase-todo'], source: 'text.git-rebase' },
|
||||
{ name: 'go', identifiers: ['go', 'golang'], source: 'source.go' },
|
||||
{ name: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' },
|
||||
{ name: 'jade', identifiers: ['jade', 'pug'], source: 'text.jade' },
|
||||
{ name: 'go', language: 'go', identifiers: ['go', 'golang'], source: 'source.go' },
|
||||
{ name: 'groovy', language: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' },
|
||||
{ name: 'jade', language: 'jade', identifiers: ['jade', 'pug'], source: 'text.jade' },
|
||||
|
||||
{ name: 'js', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' },
|
||||
{ name: 'js', language: 'javascript', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' },
|
||||
{ name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' },
|
||||
{ name: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' },
|
||||
{ name: 'less', identifiers: ['less'], source: 'source.css.less' },
|
||||
{ name: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' },
|
||||
{ name: 'scss', identifiers: ['scss'], source: 'source.css.scss' },
|
||||
{ name: 'json', language: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' },
|
||||
{ name: 'less', language: 'less', identifiers: ['less'], source: 'source.css.less' },
|
||||
{ name: 'objc', language: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' },
|
||||
{ name: 'scss', language: 'scss', identifiers: ['scss'], source: 'source.css.scss' },
|
||||
|
||||
{ name: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' },
|
||||
{ name: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' },
|
||||
{ name: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' },
|
||||
{ name: 'perl6', language: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' },
|
||||
{ name: 'powershell', language: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' },
|
||||
{ name: 'python', language: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' },
|
||||
{ name: 'regexp_python', identifiers: ['re'], source: 'source.regexp.python' },
|
||||
{ name: 'rust', identifiers: ['rust', 'rs'], source: 'source.rust' },
|
||||
{ name: 'scala', identifiers: ['scala', 'sbt'], source: 'source.scala' },
|
||||
{ name: 'shell', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init'], source: 'source.shell' },
|
||||
{ name: 'ts', identifiers: ['typescript', 'ts'], source: 'source.ts' },
|
||||
{ name: 'tsx', identifiers: ['tsx'], source: 'source.tsx' },
|
||||
{ name: 'csharp', identifiers: ['cs', 'csharp', 'c#'], source: 'source.cs' },
|
||||
{ name: 'fsharp', identifiers: ['fs', 'fsharp', 'f#'], source: 'source.fsharp' },
|
||||
{ name: 'rust', language: 'rust', identifiers: ['rust', 'rs'], source: 'source.rust' },
|
||||
{ name: 'scala', language: 'scala', identifiers: ['scala', 'sbt'], source: 'source.scala' },
|
||||
{ name: 'shell', language: 'shellscript', identifiers: ['shell', 'sh', 'bash', 'zsh', 'bashrc', 'bash_profile', 'bash_login', 'profile', 'bash_logout', '.textmate_init'], source: 'source.shell' },
|
||||
{ name: 'ts', language: 'typescript', identifiers: ['typescript', 'ts'], source: 'source.ts' },
|
||||
{ name: 'tsx', language: 'typescriptreact', identifiers: ['tsx'], source: 'source.tsx' },
|
||||
{ name: 'csharp', language: 'csharp', identifiers: ['cs', 'csharp', 'c#'], source: 'source.cs' },
|
||||
{ name: 'fsharp', language: 'fsharp', identifiers: ['fs', 'fsharp', 'f#'], source: 'source.fsharp' },
|
||||
];
|
||||
|
||||
const fencedCodeBlockDefinition = (name, identifiers, sourceScope) => {
|
||||
const fencedCodeBlockDefinition = (name, identifiers, sourceScope, language) => {
|
||||
if (!Array.isArray(sourceScope)) {
|
||||
sourceScope = [sourceScope];
|
||||
}
|
||||
|
||||
language = language || name
|
||||
|
||||
const scopes = sourceScope.map(scope =>
|
||||
`<dict>
|
||||
<key>include</key>
|
||||
@@ -106,6 +111,8 @@ const fencedCodeBlockDefinition = (name, identifiers, sourceScope) => {
|
||||
<string>(^|\\G)(\\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\\G)(?!\\s*([\`~]{3,})\\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.${language}</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
${indent(4, scopes)}
|
||||
@@ -129,7 +136,7 @@ const fencedCodeBlockInclude = (name) =>
|
||||
|
||||
const fencedCodeBlockDefinitions = () =>
|
||||
languages
|
||||
.map(language => fencedCodeBlockDefinition(language.name, language.identifiers, language.source))
|
||||
.map(language => fencedCodeBlockDefinition(language.name, language.identifiers, language.source, language.language))
|
||||
.join('\n');
|
||||
|
||||
|
||||
@@ -147,3 +154,11 @@ gulp.task('default', function () {
|
||||
.pipe(rename('markdown.tmLanguage'))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('embedded', function () {
|
||||
const out = {}
|
||||
for (const lang of languages.filter(x => x.language)) {
|
||||
out['meta.embedded.block.' +lang.language] = lang.language;
|
||||
}
|
||||
util.log(JSON.stringify(out, undefined, 4));
|
||||
});
|
||||
|
||||
@@ -354,11 +354,11 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>while</key>
|
||||
<string>^\s*(?!</(script|style|pre)>)</string>
|
||||
<string>^(?!.*</(script|style|pre)>)</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>end</key>
|
||||
<string>(?=</(script|style|pre)>)</string>
|
||||
<string>(?=.*</(script|style|pre)>)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
@@ -626,6 +626,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.css</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -677,6 +679,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.html</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -728,6 +732,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.ini</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -779,6 +785,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.java</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -830,6 +838,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.lua</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -881,6 +891,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.makefile</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -932,6 +944,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.perl</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -983,6 +997,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.r</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1034,6 +1050,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.ruby</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1085,6 +1103,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.php</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1140,6 +1160,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.sql</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1191,6 +1213,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.vs_net</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1242,6 +1266,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.xml</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1293,6 +1319,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.xsl</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1344,6 +1372,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.yaml</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1395,6 +1425,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.dosbatch</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1446,6 +1478,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.clojure</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1497,6 +1531,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.coffee</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1548,6 +1584,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.c</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1599,6 +1637,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.cpp</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1650,6 +1690,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.diff</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1701,6 +1743,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.dockerfile</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1752,6 +1796,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.git_commit</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1803,6 +1849,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.git_rebase</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1854,6 +1902,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.go</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1905,6 +1955,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.groovy</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -1956,6 +2008,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.jade</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2007,6 +2061,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.javascript</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2058,6 +2114,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.js_regexp</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2109,6 +2167,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.json</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2160,6 +2220,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.less</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2211,6 +2273,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.objc</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2262,6 +2326,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.scss</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2313,6 +2379,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.perl6</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2364,6 +2432,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.powershell</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2415,6 +2485,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.python</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2466,6 +2538,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.regexp_python</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2517,6 +2591,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.rust</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2568,6 +2644,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.scala</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2619,6 +2697,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.shellscript</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2670,6 +2750,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.typescript</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2721,6 +2803,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.typescriptreact</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2772,6 +2856,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.csharp</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -2823,6 +2909,8 @@
|
||||
<string>(^|\G)(\s*)(.*)</string>
|
||||
<key>while</key>
|
||||
<string>(^|\G)(?!\s*([`~]{3,})\s*$)</string>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.fsharp</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -3597,12 +3685,14 @@
|
||||
<key>match</key>
|
||||
<string>(`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1)</string>
|
||||
<key>name</key>
|
||||
<string>markup.inline.raw.markdown</string>
|
||||
<string>markup.inline.raw.string.markdown</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>frontMatter</key>
|
||||
<dict>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.frontmatter</string>
|
||||
<key>begin</key>
|
||||
<string>\A-{3}\s*$</string>
|
||||
<key>while</key>
|
||||
|
||||
@@ -179,11 +179,11 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>while</key>
|
||||
<string>^\s*(?!</(script|style|pre)>)</string>
|
||||
<string>^(?!.*</(script|style|pre)>)</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>end</key>
|
||||
<string>(?=</(script|style|pre)>)</string>
|
||||
<string>(?=.*</(script|style|pre)>)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
@@ -1175,12 +1175,14 @@
|
||||
<key>match</key>
|
||||
<string>(`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1)</string>
|
||||
<key>name</key>
|
||||
<string>markup.inline.raw.markdown</string>
|
||||
<string>markup.inline.raw.string.markdown</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>frontMatter</key>
|
||||
<dict>
|
||||
<key>contentName</key>
|
||||
<string>meta.embedded.block.frontmatter</string>
|
||||
<key>begin</key>
|
||||
<string>\A-{3}\s*$</string>
|
||||
<key>while</key>
|
||||
|
||||
13
extensions/markdown/test/colorize-fixtures/test-33886.md
Normal file
13
extensions/markdown/test/colorize-fixtures/test-33886.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# h
|
||||
|
||||
<pre><code>
|
||||
# a
|
||||
</code></pre>
|
||||
|
||||
# h
|
||||
|
||||
<pre>
|
||||
# a
|
||||
a</pre>
|
||||
|
||||
# h
|
||||
332
extensions/markdown/test/colorize-results/test-33886_md.json
Normal file
332
extensions/markdown/test/colorize-results/test-33886_md.json
Normal file
@@ -0,0 +1,332 @@
|
||||
[
|
||||
{
|
||||
"c": "#",
|
||||
"t": "text.html.markdown markup.heading.markdown punctuation.definition.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown markup.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "h",
|
||||
"t": "text.html.markdown markup.heading.markdown entity.name.section.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "<",
|
||||
"t": "text.html.markdown meta.tag.block.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "pre",
|
||||
"t": "text.html.markdown meta.tag.block.any.html entity.name.tag.block.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.tag.block.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "<",
|
||||
"t": "text.html.markdown meta.tag.inline.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "code",
|
||||
"t": "text.html.markdown meta.tag.inline.any.html entity.name.tag.inline.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.tag.inline.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "# a",
|
||||
"t": "text.html.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "</",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.inline.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "code",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.inline.any.html entity.name.tag.inline.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.inline.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "</",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "pre",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html entity.name.tag.block.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "text.html.markdown markup.heading.markdown punctuation.definition.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown markup.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "h",
|
||||
"t": "text.html.markdown markup.heading.markdown entity.name.section.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "<",
|
||||
"t": "text.html.markdown meta.tag.block.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "pre",
|
||||
"t": "text.html.markdown meta.tag.block.any.html entity.name.tag.block.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.tag.block.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "# a",
|
||||
"t": "text.html.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "a",
|
||||
"t": "text.html.markdown meta.paragraph.markdown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "</",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html punctuation.definition.tag.begin.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "pre",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html entity.name.tag.block.any.html",
|
||||
"r": {
|
||||
"dark_plus": "entity.name.tag: #569CD6",
|
||||
"light_plus": "entity.name.tag: #800000",
|
||||
"dark_vs": "entity.name.tag: #569CD6",
|
||||
"light_vs": "entity.name.tag: #800000",
|
||||
"hc_black": "entity.name.tag: #569CD6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": ">",
|
||||
"t": "text.html.markdown meta.paragraph.markdown meta.tag.block.any.html punctuation.definition.tag.end.html",
|
||||
"r": {
|
||||
"dark_plus": "punctuation.definition.tag: #808080",
|
||||
"light_plus": "punctuation.definition.tag: #800000",
|
||||
"dark_vs": "punctuation.definition.tag: #808080",
|
||||
"light_vs": "punctuation.definition.tag: #800000",
|
||||
"hc_black": "punctuation.definition.tag: #808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "#",
|
||||
"t": "text.html.markdown markup.heading.markdown punctuation.definition.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown markup.heading.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "h",
|
||||
"t": "text.html.markdown markup.heading.markdown entity.name.section.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.heading: #569CD6",
|
||||
"light_plus": "markup.heading: #800000",
|
||||
"dark_vs": "markup.heading: #569CD6",
|
||||
"light_vs": "markup.heading: #800000",
|
||||
"hc_black": "markup.heading: #6796E6"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -652,11 +652,11 @@
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html meta.tag.metadata.script.html",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -674,11 +674,11 @@
|
||||
"c": "=",
|
||||
"t": "text.html.markdown meta.embedded.block.html meta.tag.metadata.script.html",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -729,22 +729,22 @@
|
||||
"c": " function( x: int ) { return x*x; }",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.unknown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.unknown",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1026,11 +1026,11 @@
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1048,33 +1048,33 @@
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "{",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css punctuation.section.property-list.begin.bracket.curly.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1092,22 +1092,22 @@
|
||||
"c": ":",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css punctuation.separator.key-value.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1147,33 +1147,33 @@
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": "}",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css meta.property-list.css punctuation.section.property-list.end.bracket.curly.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"c": " ",
|
||||
"t": "text.html.markdown meta.embedded.block.html source.css",
|
||||
"r": {
|
||||
"dark_plus": "default: #D4D4D4",
|
||||
"light_plus": "default: #000000",
|
||||
"dark_vs": "default: #D4D4D4",
|
||||
"light_vs": "default: #000000",
|
||||
"hc_black": "default: #FFFFFF"
|
||||
"dark_plus": "meta.embedded: #D4D4D4",
|
||||
"light_plus": "meta.embedded: #000000",
|
||||
"dark_vs": "meta.embedded: #D4D4D4",
|
||||
"light_vs": "meta.embedded: #000000",
|
||||
"hc_black": "meta.embedded: #FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1541,7 +1541,7 @@
|
||||
},
|
||||
{
|
||||
"c": "`",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.string.markdown punctuation.definition.raw.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.inline.raw: #CE9178",
|
||||
"light_plus": "markup.inline.raw: #800000",
|
||||
@@ -1552,7 +1552,7 @@
|
||||
},
|
||||
{
|
||||
"c": "code()",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.markdown",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.string.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.inline.raw: #CE9178",
|
||||
"light_plus": "markup.inline.raw: #800000",
|
||||
@@ -1563,7 +1563,7 @@
|
||||
},
|
||||
{
|
||||
"c": "`",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown",
|
||||
"t": "text.html.markdown meta.paragraph.markdown markup.inline.raw.string.markdown punctuation.definition.raw.markdown",
|
||||
"r": {
|
||||
"dark_plus": "markup.inline.raw: #CE9178",
|
||||
"light_plus": "markup.inline.raw: #800000",
|
||||
|
||||
Reference in New Issue
Block a user