Skip to content

Commit

Permalink
fix: prettyHTML format error (#130)
Browse files Browse the repository at this point in the history
* fix: prettyHTML format error

* chroe: add missing changelog
  • Loading branch information
iChenLei authored Dec 8, 2021
1 parent b406948 commit bea88f5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.4.5 / 2021-12-08
==================

* Fix [#129](https://github.com/wx-minapp/minapp-vscode/issues/129)

2.4.4 / 2021-12-04
==================

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "minapp-vscode",
"displayName": "WXML - Language Service",
"description": "wechat miniprogram .wxml file syntax highlight,code autocomplete(support native miniprogram、mpvue and wepy framework,provide code snippets)",
"version": "2.4.4",
"version": "2.4.5",
"publisher": "qiu8310",
"extensionKind": [
"workspace"
Expand Down
16 changes: 8 additions & 8 deletions res/prettyhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -4088,14 +4088,14 @@
if (this._getParentElement()) {
this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
}
// if (this.getTagDefinition(nameInfo.fullName, this.options.ignoreFirstLf, this.options.selfClosingElements)
// .isVoid) {
// this._errors.push(TreeError.create(nameInfo.fullName, endTagToken.sourceSpan, `Void elements do not have end tags "${endTagToken.parts[1]}"`));
// }
// else if (!this._popElement(nameInfo.fullName)) {
// const errMsg = `Unexpected closing tag "${nameInfo.fullName}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
// this._errors.push(TreeError.create(nameInfo.fullName, endTagToken.sourceSpan, errMsg));
// }
if (this.getTagDefinition(nameInfo.fullName, this.options.ignoreFirstLf, this.options.selfClosingElements)
.isVoid) {
// this._errors.push(TreeError.create(nameInfo.fullName, endTagToken.sourceSpan, `Void elements do not have end tags "${endTagToken.parts[1]}"`));
}
else if (!this._popElement(nameInfo.fullName)) {
// const errMsg = `Unexp ected closing tag "${nameInfo.fullName}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
// this._errors.push(TreeError.create(nameInfo.fullName, endTagToken.sourceSpan, errMsg));
}
}
_popElement(fullName) {
for (let stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {
Expand Down

0 comments on commit bea88f5

Please sign in to comment.