Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/prettier-plugin-marko-4-1-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@marko/language-server": patch
"marko-vscode": patch
---

Update prettier-plugin-marko to 4.1.3, so formatting keeps the comments inside an open tag, which it deleted before, and no longer doubles the backslashes in text. A line comment that ends a tag var is moved into a block comment, since it would otherwise swallow the rest of the tag.
6 changes: 3 additions & 3 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
},
"dependencies": {
"@luxass/strip-json-comments": "^1.4.0",
"@marko/compiler": "^5.42.6",
"@marko/compiler": "^5.42.8",
"@marko/language-tools": "^2.7.0",
"axe-core": "^4.12.1",
"htmljs-parser": "^5.15.1",
"htmljs-parser": "^5.17.1",
"jsdom": "^29.1.1",
"marko": "^5.39.43",
"prettier": "^3.8.4",
"prettier-plugin-marko": "^4.1.1",
"prettier-plugin-marko": "^4.1.3",
"relative-import-path": "^1.0.1",
"typescript": "^6.0.3",
"vscode-css-languageservice": "^6.3.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
## Diagnostics
### Ln 1, Col 13
```marko
> 1 | <div data-x=#2/>
| ^ Unexpected digit after hash token.
2 |
3 | <div onClick(a, %b) {
4 | console.log(#hello!);
```

### Ln 3, Col 17
```marko
1 | <div data-x=#2/>
2 |
> 3 | <div onClick(a, %b) {
| ^ Unexpected token
4 | console.log(#hello!);
5 | }/>
6 |
```

### Ln 4, Col 15
```marko
2 |
3 | <div onClick(a, %b) {
> 4 | console.log(#hello!);
| ^ Private names are only allowed in property accesses (`obj.#hello`) or in `in` expressions (`#hello in obj`).
5 | }/>
6 |
```

### Ln 3, Col 17
```marko
1 | <div data-x=#2/>
Expand Down
4 changes: 2 additions & 2 deletions packages/language-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
},
"dependencies": {
"@luxass/strip-json-comments": "^1.4.0",
"@marko/compiler": "^5.42.6",
"htmljs-parser": "^5.15.1",
"@marko/compiler": "^5.42.8",
"htmljs-parser": "^5.17.1",
"relative-import-path": "^1.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/type-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@luxass/strip-json-comments": "^1.4.0",
"@marko/compiler": "^5.42.6",
"@marko/compiler": "^5.42.8",
"@marko/language-tools": "^2.7.0",
"arg": "^5.0.2",
"kleur": "^4.1.5",
Expand Down
15 changes: 15 additions & 0 deletions packages/vscode/src/__tests__/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ describe("format", () => {
<div/>
<button async onClick() { await save(). }>go</button>

`,
);
});

it("comments between attrs", async () => {
await snap.inline(
() =>
format('<input\n // the field name\n name="email" type="email"/>'),
`
<input
// the field name
name="email"
type="email"
>

`,
);
});
Expand Down
50 changes: 25 additions & 25 deletions pnpm-lock.yaml

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

Loading