mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -135,6 +135,7 @@ h3 code,
|
||||
h4 code,
|
||||
h5 code,
|
||||
h6 code {
|
||||
font-size: inherit;
|
||||
line-height: auto;
|
||||
}
|
||||
|
||||
@@ -167,8 +168,8 @@ blockquote {
|
||||
|
||||
code {
|
||||
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
|
||||
font-size: 1em;
|
||||
line-height: 1.357em;
|
||||
font-size: 1rem;
|
||||
line-height: 1.357rem;
|
||||
}
|
||||
|
||||
body.wordWrap pre {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"version": "1.0.0",
|
||||
"icon": "icon.png",
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
||||
"engines": {
|
||||
"vscode": "^1.20.0"
|
||||
@@ -314,7 +313,7 @@
|
||||
"build-preview": "webpack --mode development"
|
||||
},
|
||||
"dependencies": {
|
||||
"highlight.js": "9.15.8",
|
||||
"highlight.js": "9.13.1",
|
||||
"markdown-it": "^8.4.2",
|
||||
"markdown-it-front-matter": "^0.1.2",
|
||||
"vscode-extension-telemetry": "0.1.1",
|
||||
@@ -324,7 +323,7 @@
|
||||
"@types/highlight.js": "9.12.3",
|
||||
"@types/lodash.throttle": "^4.1.3",
|
||||
"@types/markdown-it": "0.0.2",
|
||||
"@types/node": "^10.14.8",
|
||||
"@types/node": "^10.12.21",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"mocha-junit-reporter": "^1.17.0",
|
||||
"mocha-multi-reporters": "^1.1.7",
|
||||
|
||||
@@ -5,20 +5,17 @@
|
||||
|
||||
import * as path from 'path';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { OpenDocumentLinkCommand } from '../commands/openDocumentLink';
|
||||
import { getUriForLinkWithKnownExternalScheme } from '../util/links';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
function parseLink(
|
||||
function normalizeLink(
|
||||
document: vscode.TextDocument,
|
||||
link: string,
|
||||
base: string
|
||||
): { uri: vscode.Uri, tooltip?: string } {
|
||||
): vscode.Uri {
|
||||
const externalSchemeUri = getUriForLinkWithKnownExternalScheme(link);
|
||||
if (externalSchemeUri) {
|
||||
return { uri: externalSchemeUri };
|
||||
return externalSchemeUri;
|
||||
}
|
||||
|
||||
// Assume it must be an relative or absolute file path
|
||||
@@ -37,10 +34,7 @@ function parseLink(
|
||||
resourcePath = base ? path.join(base, tempUri.path) : tempUri.path;
|
||||
}
|
||||
|
||||
return {
|
||||
uri: OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment),
|
||||
tooltip: localize('documentLink.tooltip', 'follow link')
|
||||
};
|
||||
return OpenDocumentLinkCommand.createCommandUri(resourcePath, tempUri.fragment);
|
||||
}
|
||||
|
||||
function matchAll(
|
||||
@@ -67,12 +61,9 @@ function extractDocumentLink(
|
||||
const linkStart = document.positionAt(offset);
|
||||
const linkEnd = document.positionAt(offset + link.length);
|
||||
try {
|
||||
const { uri, tooltip } = parseLink(document, link, base);
|
||||
const documentLink = new vscode.DocumentLink(
|
||||
return new vscode.DocumentLink(
|
||||
new vscode.Range(linkStart, linkEnd),
|
||||
uri);
|
||||
documentLink.tooltip = tooltip;
|
||||
return documentLink;
|
||||
normalizeLink(document, link, base));
|
||||
} catch (e) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -153,10 +144,11 @@ export default class LinkProvider implements vscode.DocumentLinkProvider {
|
||||
}
|
||||
}
|
||||
|
||||
for (const definition of definitions.values()) {
|
||||
for (const definition of Array.from(definitions.values())) {
|
||||
try {
|
||||
const { uri } = parseLink(document, definition.link, base);
|
||||
results.push(new vscode.DocumentLink(definition.linkRange, uri));
|
||||
results.push(new vscode.DocumentLink(
|
||||
definition.linkRange,
|
||||
normalizeLink(document, definition.link, base)));
|
||||
} catch (e) {
|
||||
// noop
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-0.0.2.tgz#5d9ad19e6e6508cdd2f2596df86fd0aade598660"
|
||||
integrity sha1-XZrRnm5lCM3S8llt+G/Qqt5ZhmA=
|
||||
|
||||
"@types/node@^10.14.8":
|
||||
version "10.14.8"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
|
||||
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==
|
||||
"@types/node@^10.12.21":
|
||||
version "10.12.21"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.21.tgz#7e8a0c34cf29f4e17a36e9bd0ea72d45ba03908e"
|
||||
integrity sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==
|
||||
|
||||
abbrev@1:
|
||||
version "1.1.1"
|
||||
@@ -2933,10 +2933,10 @@ he@1.1.1:
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
|
||||
integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0=
|
||||
|
||||
highlight.js@9.15.8:
|
||||
version "9.15.8"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.8.tgz#f344fda123f36f1a65490e932cf90569e4999971"
|
||||
integrity sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==
|
||||
highlight.js@9.13.1:
|
||||
version "9.13.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
|
||||
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
|
||||
|
||||
hmac-drbg@^1.0.0:
|
||||
version "1.0.1"
|
||||
|
||||
Reference in New Issue
Block a user