Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-html-languageservice

Package Overview
Dependencies
Maintainers
6
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-html-languageservice - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

CHANGELOG.md

@@ -1,2 +0,2 @@

NEXT (3.0.0)
3.0.0 / 2019-06-12
==================

@@ -3,0 +3,0 @@ * Added API `htmlLanguageService.getSelectionRanges` returning selection ranges for a set of positions

@@ -48,3 +48,3 @@ # Custom Data for HTML Language Service

- Completion on tag, attirbute and attribute value
- Completion on tag, attribute and attribute value
- Hover on tag (here's the [issue](https://github.com/Microsoft/vscode-html-languageservice/issues/47) for hover on attribute / attribute-name)

@@ -96,2 +96,2 @@

- Completion on `<foo xattr=>` will provide all values in valueSet `x`, which is `xval`
- Hover on `foo` will show `The foo element`
- Hover on `foo` will show `The foo element`
// copied from js-beautify/js/lib/beautify-css.js
// version: 1.9.0
// version: 1.10.0
/* AUTO-GENERATED. DO NOT MODIFY. */

@@ -323,3 +323,7 @@ /*

var result = '';
if (!this.is_empty()) {
if (this.is_empty()) {
if (this.__parent.indent_empty_lines) {
result = this.__parent.get_indent_string(this.__indent_count);
}
} else {
result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);

@@ -401,2 +405,3 @@ result += this.__items.join('');

this.wrap_line_length = options.wrap_line_length;
this.indent_empty_lines = options.indent_empty_lines;
this.__lines = [];

@@ -654,2 +659,8 @@ this.previous_line = null;

this.indent_empty_lines = this._get_boolean('indent_empty_lines');
// valid templating languages ['django', 'erb', 'handlebars', 'php']
// For now, 'auto' = all off for javascript, all on for html (and inline javascript).
// other values ignored
this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
}

@@ -1309,2 +1320,5 @@

this._ch = this._input.next();
if (this._ch === '\\' && this._input.hasNext()) {
this._ch += this._input.next();
}
topCharacter = this._ch;

@@ -1442,3 +1456,3 @@

} else if (this._ch === ":") {
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend) {
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
// 'property: value' delimiter

@@ -1475,17 +1489,23 @@ // which could be in a conditional group query

} else if (this._ch === ';') {
if (insidePropertyValue) {
this.outdent();
insidePropertyValue = false;
}
insideAtExtend = false;
insideAtImport = false;
this.print_string(this._ch);
this.eatWhitespace(true);
if (parenLevel === 0) {
if (insidePropertyValue) {
this.outdent();
insidePropertyValue = false;
}
insideAtExtend = false;
insideAtImport = false;
this.print_string(this._ch);
this.eatWhitespace(true);
// This maintains single line comments on the same
// line. Block comments are also affected, but
// a new line is always output before one inside
// that section
if (this._input.peek() !== '/') {
this._output.add_new_line();
// This maintains single line comments on the same
// line. Block comments are also affected, but
// a new line is always output before one inside
// that section
if (this._input.peek() !== '/') {
this._output.add_new_line();
}
} else {
this.print_string(this._ch);
this.eatWhitespace(true);
this._output.space_before_token = true;
}

@@ -1496,22 +1516,31 @@ } else if (this._ch === '(') { // may be a url

this.eatWhitespace();
parenLevel++;
this.indent();
this._ch = this._input.next();
if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
this._input.back();
parenLevel++;
} else if (this._ch) {
this.print_string(this._ch + this.eatString(')'));
if (parenLevel) {
parenLevel--;
this.outdent();
}
}
} else {
parenLevel++;
this.preserveSingleSpace(isAfterSpace);
this.print_string(this._ch);
this.eatWhitespace();
parenLevel++;
this.indent();
}
} else if (this._ch === ')') {
if (parenLevel) {
parenLevel--;
this.outdent();
}
this.print_string(this._ch);
parenLevel--;
} else if (this._ch === ',') {
this.print_string(this._ch);
this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel < 1 && !insideAtImport) {
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
this._output.add_new_line();

@@ -1521,3 +1550,3 @@ } else {

}
} else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel < 1) {
} else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
//handle combinator spacing

@@ -1547,3 +1576,3 @@ if (this._options.space_around_combinator) {

}
} else if (this._ch === '!') { // !important
} else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important
this.print_string(' ');

@@ -1621,2 +1650,2 @@ this.print_string(this._ch);

export const css_beautify = legacy_beautify_css;
export var css_beautify = legacy_beautify_css;

@@ -12,2 +12,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=beautify.js.map

@@ -1,3 +0,3 @@

import { TextDocument, Position, CompletionList, Hover, Range, SymbolInformation, TextEdit, DocumentHighlight, DocumentLink, FoldingRange } from 'vscode-languageserver-types';
import { Scanner, HTMLDocument, CompletionConfiguration, ICompletionParticipant, HTMLFormatConfiguration, DocumentContext, IHTMLDataProvider, SelectionRange, HTMLDataV1 } from './htmlLanguageTypes';
import { TextDocument, Position, CompletionList, Hover, Range, SymbolInformation, TextEdit, DocumentHighlight, DocumentLink, FoldingRange, SelectionRange } from 'vscode-languageserver-types';
import { Scanner, HTMLDocument, CompletionConfiguration, ICompletionParticipant, HTMLFormatConfiguration, DocumentContext, IHTMLDataProvider, HTMLDataV1 } from './htmlLanguageTypes';
export * from './htmlLanguageTypes';

@@ -19,3 +19,3 @@ export * from 'vscode-languageserver-types';

}): FoldingRange[];
getSelectionRanges(document: TextDocument, positions: Position[]): SelectionRange[][];
getSelectionRanges(document: TextDocument, positions: Position[]): SelectionRange[];
}

@@ -22,0 +22,0 @@ export interface LanguageServiceOptions {

@@ -42,2 +42,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlLanguageService.js.map
import { TextDocument, Position, Range } from 'vscode-languageserver-types';
/**
* Enum of known selection range kinds
*/
export declare enum SelectionRangeKind {
/**
* Empty Kind.
*/
Empty = "",
/**
* The statment kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
Statement = "statement",
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
Declaration = "declaration"
}
/**
* Represents a selection range
*/
export interface SelectionRange {
/**
* Range of the selection.
*/
range: Range;
/**
* Describes the kind of the selection range such as `statemet' or 'declaration'. See
* [SelectionRangeKind](#SelectionRangeKind) for an enumeration of standardized kinds.
*/
kind: string;
}
export interface HTMLFormatConfiguration {
tabSize?: number;
insertSpaces?: boolean;
indentEmptyLines?: boolean;
wrapLineLength?: number;

@@ -39,0 +7,0 @@ unformatted?: string;

@@ -5,23 +5,2 @@ /*---------------------------------------------------------------------------------------------

*--------------------------------------------------------------------------------------------*/
// #region Proposed types, remove once added to vscode-languageserver-types
/**
* Enum of known selection range kinds
*/
export var SelectionRangeKind;
(function (SelectionRangeKind) {
/**
* Empty Kind.
*/
SelectionRangeKind["Empty"] = "";
/**
* The statment kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
SelectionRangeKind["Statement"] = "statement";
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
SelectionRangeKind["Declaration"] = "declaration";
})(SelectionRangeKind || (SelectionRangeKind = {}));
export var TokenType;

@@ -66,2 +45,1 @@ (function (TokenType) {

})(ScannerState || (ScannerState = {}));
//# sourceMappingURL=htmlLanguageTypes.js.map

@@ -18,2 +18,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=builtinDataProviders.js.map

@@ -1211,2 +1211,1 @@ /*---------------------------------------------------------------------------------------------

];
//# sourceMappingURL=html5.js.map

@@ -228,2 +228,1 @@ /*---------------------------------------------------------------------------------------------

];
//# sourceMappingURL=html5Aria.js.map

@@ -228,2 +228,1 @@ /*---------------------------------------------------------------------------------------------

];
//# sourceMappingURL=html5Events.js.map

@@ -96,2 +96,1 @@ /*---------------------------------------------------------------------------------------------

export { HTMLDataProvider };
//# sourceMappingURL=dataProvider.js.map

@@ -11,2 +11,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=fact.js.map

@@ -2242,2 +2242,1 @@ /*---------------------------------------------------------------------------------------------

};
//# sourceMappingURL=htmlEntities.js.map

@@ -158,2 +158,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlParser.js.map

@@ -393,2 +393,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlScanner.js.map

@@ -161,3 +161,3 @@ /*---------------------------------------------------------------------------------------------

codeSnippet = codeSnippet + value;
if (attr.valueSet) {
if (attr.valueSet || attr.name === 'style') {
command = {

@@ -471,2 +471,1 @@ title: 'Suggest',

}
//# sourceMappingURL=htmlCompletion.js.map

@@ -167,2 +167,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlFolding.js.map

@@ -63,2 +63,3 @@ /*---------------------------------------------------------------------------------------------

indent_char: options.insertSpaces ? ' ' : '\t',
indent_empty_lines: getFormatOption(options, 'indentEmptyLines', false),
wrap_line_length: getFormatOption(options, 'wrapLineLength', 120),

@@ -149,2 +150,1 @@ unformatted: getTagsFormatOption(options, 'unformatted', void 0),

}
//# sourceMappingURL=htmlFormatter.js.map

@@ -44,2 +44,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlHighlighting.js.map

@@ -63,2 +63,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlHover.js.map

@@ -8,3 +8,3 @@ /*---------------------------------------------------------------------------------------------

import * as strings from '../utils/strings';
import Uri from 'vscode-uri';
import { URI as Uri } from 'vscode-uri';
import { TokenType } from '../htmlLanguageTypes';

@@ -26,8 +26,3 @@ function normalizeRef(url, languageId) {

}
try {
return !!Uri.parse(url);
}
catch (e) {
return false;
}
return /\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(url);
}

@@ -124,2 +119,1 @@ function getWorkspaceUrl(documentUri, tokenContent, documentContext, base) {

}
//# sourceMappingURL=htmlLinks.js.map

@@ -5,30 +5,22 @@ /**

*/
import { Range } from 'vscode-languageserver-types';
import { Range, SelectionRange } from 'vscode-languageserver-types';
import { createScanner } from '../parser/htmlScanner';
import { parse } from '../parser/htmlParser';
import { TokenType, SelectionRangeKind } from '../htmlLanguageTypes';
import { TokenType } from '../htmlLanguageTypes';
export function getSelectionRanges(document, positions) {
function getSelectionRange(position) {
var applicableRanges = getApplicableRanges(document, position);
var ranges = applicableRanges
/**
* Filter duplicated ranges
*/
.filter(function (pair, i) {
if (i === 0) {
return true;
var prev = undefined;
var current = undefined;
for (var index = applicableRanges.length - 1; index >= 0; index--) {
var range = applicableRanges[index];
if (!prev || range[0] !== prev[0] || range[1] !== prev[1]) {
current = SelectionRange.create(Range.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
}
var prev = applicableRanges[i - 1];
if (pair[0] === prev[0] && pair[1] === prev[1]) {
return false;
}
return true;
})
.map(function (pair) {
return {
range: Range.create(document.positionAt(pair[0]), document.positionAt(pair[1])),
kind: SelectionRangeKind.Declaration
};
});
return ranges;
prev = range;
}
if (!current) {
current = SelectionRange.create(Range.create(position, position));
}
return current;
}

@@ -180,2 +172,1 @@ return positions.map(getSelectionRange);

}
//# sourceMappingURL=htmlSelectionRange.js.map

@@ -41,2 +41,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=htmlSymbolsProvider.js.map

@@ -43,2 +43,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=arrays.js.map

@@ -65,2 +65,1 @@ /*---------------------------------------------------------------------------------------------

};
//# sourceMappingURL=paths.js.map

@@ -65,2 +65,1 @@ /*---------------------------------------------------------------------------------------------

}
//# sourceMappingURL=strings.js.map
// copied from js-beautify/js/lib/beautify-css.js
// version: 1.9.0
// version: 1.10.0
/* AUTO-GENERATED. DO NOT MODIFY. */

@@ -326,3 +326,7 @@ /*

var result = '';
if (!this.is_empty()) {
if (this.is_empty()) {
if (this.__parent.indent_empty_lines) {
result = this.__parent.get_indent_string(this.__indent_count);
}
} else {
result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);

@@ -404,2 +408,3 @@ result += this.__items.join('');

this.wrap_line_length = options.wrap_line_length;
this.indent_empty_lines = options.indent_empty_lines;
this.__lines = [];

@@ -657,2 +662,8 @@ this.previous_line = null;

this.indent_empty_lines = this._get_boolean('indent_empty_lines');
// valid templating languages ['django', 'erb', 'handlebars', 'php']
// For now, 'auto' = all off for javascript, all on for html (and inline javascript).
// other values ignored
this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php'], ['auto']);
}

@@ -1312,2 +1323,5 @@

this._ch = this._input.next();
if (this._ch === '\\' && this._input.hasNext()) {
this._ch += this._input.next();
}
topCharacter = this._ch;

@@ -1445,3 +1459,3 @@

} else if (this._ch === ":") {
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend) {
if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !insideAtExtend && parenLevel === 0) {
// 'property: value' delimiter

@@ -1478,17 +1492,23 @@ // which could be in a conditional group query

} else if (this._ch === ';') {
if (insidePropertyValue) {
this.outdent();
insidePropertyValue = false;
}
insideAtExtend = false;
insideAtImport = false;
this.print_string(this._ch);
this.eatWhitespace(true);
if (parenLevel === 0) {
if (insidePropertyValue) {
this.outdent();
insidePropertyValue = false;
}
insideAtExtend = false;
insideAtImport = false;
this.print_string(this._ch);
this.eatWhitespace(true);
// This maintains single line comments on the same
// line. Block comments are also affected, but
// a new line is always output before one inside
// that section
if (this._input.peek() !== '/') {
this._output.add_new_line();
// This maintains single line comments on the same
// line. Block comments are also affected, but
// a new line is always output before one inside
// that section
if (this._input.peek() !== '/') {
this._output.add_new_line();
}
} else {
this.print_string(this._ch);
this.eatWhitespace(true);
this._output.space_before_token = true;
}

@@ -1499,22 +1519,31 @@ } else if (this._ch === '(') { // may be a url

this.eatWhitespace();
parenLevel++;
this.indent();
this._ch = this._input.next();
if (this._ch === ')' || this._ch === '"' || this._ch === '\'') {
this._input.back();
parenLevel++;
} else if (this._ch) {
this.print_string(this._ch + this.eatString(')'));
if (parenLevel) {
parenLevel--;
this.outdent();
}
}
} else {
parenLevel++;
this.preserveSingleSpace(isAfterSpace);
this.print_string(this._ch);
this.eatWhitespace();
parenLevel++;
this.indent();
}
} else if (this._ch === ')') {
if (parenLevel) {
parenLevel--;
this.outdent();
}
this.print_string(this._ch);
parenLevel--;
} else if (this._ch === ',') {
this.print_string(this._ch);
this.eatWhitespace(true);
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel < 1 && !insideAtImport) {
if (this._options.selector_separator_newline && !insidePropertyValue && parenLevel === 0 && !insideAtImport) {
this._output.add_new_line();

@@ -1524,3 +1553,3 @@ } else {

}
} else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel < 1) {
} else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {
//handle combinator spacing

@@ -1550,3 +1579,3 @@ if (this._options.space_around_combinator) {

}
} else if (this._ch === '!') { // !important
} else if (this._ch === '!' && !this._input.lookBack("\\")) { // !important
this.print_string(' ');

@@ -1553,0 +1582,0 @@ this.print_string(this._ch);

@@ -25,2 +25,1 @@ (function (factory) {

});
//# sourceMappingURL=beautify.js.map

@@ -1,3 +0,3 @@

import { TextDocument, Position, CompletionList, Hover, Range, SymbolInformation, TextEdit, DocumentHighlight, DocumentLink, FoldingRange } from 'vscode-languageserver-types';
import { Scanner, HTMLDocument, CompletionConfiguration, ICompletionParticipant, HTMLFormatConfiguration, DocumentContext, IHTMLDataProvider, SelectionRange, HTMLDataV1 } from './htmlLanguageTypes';
import { TextDocument, Position, CompletionList, Hover, Range, SymbolInformation, TextEdit, DocumentHighlight, DocumentLink, FoldingRange, SelectionRange } from 'vscode-languageserver-types';
import { Scanner, HTMLDocument, CompletionConfiguration, ICompletionParticipant, HTMLFormatConfiguration, DocumentContext, IHTMLDataProvider, HTMLDataV1 } from './htmlLanguageTypes';
export * from './htmlLanguageTypes';

@@ -19,3 +19,3 @@ export * from 'vscode-languageserver-types';

}): FoldingRange[];
getSelectionRanges(document: TextDocument, positions: Position[]): SelectionRange[][];
getSelectionRanges(document: TextDocument, positions: Position[]): SelectionRange[];
}

@@ -22,0 +22,0 @@ export interface LanguageServiceOptions {

@@ -59,2 +59,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlLanguageService.js.map
import { TextDocument, Position, Range } from 'vscode-languageserver-types';
/**
* Enum of known selection range kinds
*/
export declare enum SelectionRangeKind {
/**
* Empty Kind.
*/
Empty = "",
/**
* The statment kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
Statement = "statement",
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
Declaration = "declaration"
}
/**
* Represents a selection range
*/
export interface SelectionRange {
/**
* Range of the selection.
*/
range: Range;
/**
* Describes the kind of the selection range such as `statemet' or 'declaration'. See
* [SelectionRangeKind](#SelectionRangeKind) for an enumeration of standardized kinds.
*/
kind: string;
}
export interface HTMLFormatConfiguration {
tabSize?: number;
insertSpaces?: boolean;
indentEmptyLines?: boolean;
wrapLineLength?: number;

@@ -39,0 +7,0 @@ unformatted?: string;

@@ -16,23 +16,2 @@ /*---------------------------------------------------------------------------------------------

Object.defineProperty(exports, "__esModule", { value: true });
// #region Proposed types, remove once added to vscode-languageserver-types
/**
* Enum of known selection range kinds
*/
var SelectionRangeKind;
(function (SelectionRangeKind) {
/**
* Empty Kind.
*/
SelectionRangeKind["Empty"] = "";
/**
* The statment kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
SelectionRangeKind["Statement"] = "statement";
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
SelectionRangeKind["Declaration"] = "declaration";
})(SelectionRangeKind = exports.SelectionRangeKind || (exports.SelectionRangeKind = {}));
var TokenType;

@@ -78,2 +57,1 @@ (function (TokenType) {

});
//# sourceMappingURL=htmlLanguageTypes.js.map

@@ -32,2 +32,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=builtinDataProviders.js.map

@@ -1224,2 +1224,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=html5.js.map

@@ -240,2 +240,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=html5Aria.js.map

@@ -240,2 +240,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=html5Events.js.map

@@ -108,2 +108,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=dataProvider.js.map

@@ -24,2 +24,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=fact.js.map

@@ -171,2 +171,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlParser.js.map

@@ -406,2 +406,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlScanner.js.map

@@ -172,3 +172,3 @@ /*---------------------------------------------------------------------------------------------

codeSnippet = codeSnippet + value;
if (attr.valueSet) {
if (attr.valueSet || attr.name === 'style') {
command = {

@@ -483,2 +483,1 @@ title: 'Suggest',

});
//# sourceMappingURL=htmlCompletion.js.map

@@ -180,2 +180,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlFolding.js.map

@@ -74,2 +74,3 @@ /*---------------------------------------------------------------------------------------------

indent_char: options.insertSpaces ? ' ' : '\t',
indent_empty_lines: getFormatOption(options, 'indentEmptyLines', false),
wrap_line_length: getFormatOption(options, 'wrapLineLength', 120),

@@ -162,2 +163,1 @@ unformatted: getTagsFormatOption(options, 'unformatted', void 0),

});
//# sourceMappingURL=htmlFormatter.js.map

@@ -57,2 +57,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlHighlighting.js.map

@@ -76,2 +76,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlHover.js.map

@@ -36,8 +36,3 @@ /*---------------------------------------------------------------------------------------------

}
try {
return !!vscode_uri_1.default.parse(url);
}
catch (e) {
return false;
}
return /\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(url);
}

@@ -83,3 +78,3 @@ function getWorkspaceUrl(documentUri, tokenContent, documentContext, base) {

try {
vscode_uri_1.default.parse(uri);
vscode_uri_1.URI.parse(uri);
return true;

@@ -137,2 +132,1 @@ }

});
//# sourceMappingURL=htmlLinks.js.map

@@ -23,23 +23,15 @@ (function (factory) {

var applicableRanges = getApplicableRanges(document, position);
var ranges = applicableRanges
/**
* Filter duplicated ranges
*/
.filter(function (pair, i) {
if (i === 0) {
return true;
var prev = undefined;
var current = undefined;
for (var index = applicableRanges.length - 1; index >= 0; index--) {
var range = applicableRanges[index];
if (!prev || range[0] !== prev[0] || range[1] !== prev[1]) {
current = vscode_languageserver_types_1.SelectionRange.create(vscode_languageserver_types_1.Range.create(document.positionAt(applicableRanges[index][0]), document.positionAt(applicableRanges[index][1])), current);
}
var prev = applicableRanges[i - 1];
if (pair[0] === prev[0] && pair[1] === prev[1]) {
return false;
}
return true;
})
.map(function (pair) {
return {
range: vscode_languageserver_types_1.Range.create(document.positionAt(pair[0]), document.positionAt(pair[1])),
kind: htmlLanguageTypes_1.SelectionRangeKind.Declaration
};
});
return ranges;
prev = range;
}
if (!current) {
current = vscode_languageserver_types_1.SelectionRange.create(vscode_languageserver_types_1.Range.create(position, position));
}
return current;
}

@@ -193,2 +185,1 @@ return positions.map(getSelectionRange);

});
//# sourceMappingURL=htmlSelectionRange.js.map

@@ -54,2 +54,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=htmlSymbolsProvider.js.map

@@ -57,2 +57,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=arrays.js.map

@@ -80,2 +80,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=paths.js.map

@@ -82,2 +82,1 @@ /*---------------------------------------------------------------------------------------------

});
//# sourceMappingURL=strings.js.map
{
"name": "vscode-html-languageservice",
"version": "3.0.1",
"version": "3.0.2",
"description": "Language service for HTML",

@@ -21,17 +21,17 @@ "main": "./lib/umd/htmlLanguageService.js",

"cpy-cli": "^2.0.0",
"js-beautify": "^1.9.0",
"mocha": "^6.0.2",
"js-beautify": "^1.10.0",
"mocha": "^6.1.4",
"remark": "^10.0.1",
"rimraf": "^2.6.3",
"strip-markdown": "^3.0.3",
"tslint": "^5.13.1",
"typescript": "^3.3.3333"
"tslint": "^5.17.0",
"typescript": "^3.5.1"
},
"dependencies": {
"vscode-languageserver-types": "^3.14.0",
"vscode-nls": "^4.0.0",
"vscode-uri": "^1.0.6"
"vscode-languageserver-types": "^3.15.0-next.2",
"vscode-nls": "^4.1.1",
"vscode-uri": "^2.0.1"
},
"scripts": {
"prepublishOnly": "npm run clean && npm run compile-esm && npm run test",
"prepublishOnly": "npm run clean && npm run compile-esm && npm run test && npm run remove-sourcemap-refs",
"postpublish": "node ./build/post-publish.js",

@@ -42,2 +42,3 @@ "compile": "tsc -p ./src && cpy ./src/beautify/*.js ./lib/umd/beautify",

"clean": "rimraf lib",
"remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js",
"test": "npm run compile && mocha && npm run lint",

@@ -44,0 +45,0 @@ "lint": "tslint src/**/*.ts",

@@ -21,3 +21,4 @@ # vscode-html-languageservice

- *findDocumentSymbols* finds all the symbols in the document.
- *htmlLanguageService.getFoldingRanges* returning folding ranges for the given document
- *getFoldingRanges* return folding ranges for the given document.
- *getSelectionRanges* return the selection ranges for the given document.

@@ -24,0 +25,0 @@ Installation

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc