-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Two weeks ago in 9f57a24 (chore: move to oxc + dprint), many markdown files were not correctly formatted.
Some pages in website become really hard to understand. Could you revert that commit?
Examples
Intentionally unformatted code got formatted
ast-grep.github.io/website/guide/quick-start.md
Lines 81 to 96 in 0c27663
For example, the following pattern code | |
```javascript | |
obj.val && obj.val() | |
``` | |
will match all the following code, regardless of white spaces or new lines. | |
```javascript | |
obj.val && obj.val() // verbatim match, of course | |
obj.val && obj.val() // this matches, too | |
// this matches as well! | |
const result = obj.val && | |
obj.val() | |
``` |
obj.val && obj.val() // verbatim match, of course
obj.val && obj.val() // this matches, too
The above two identical lines used to be the following, showing that ast-grep understands that white spaces are meaningless here.
obj.val && obj.val() // verbatim match, of course
obj.val && obj.val() // this matches, too
VitePress markdown extensions were not respected
VitePress markdown supports custom containers using :::
.
ast-grep.github.io/website/guide/pattern-syntax.md
Lines 103 to 110 in 0c27663
:::details `ARGS` will be populated with a list of AST nodes. Click to see details. | |
| Code | Match | | |
| ------------------------------- | --------------- | | |
| `function foo(bar) { ... }` | [`bar`] | | |
| `function noop() {}` | [] | | |
| `function add(a, b, c) { ... }` | [`a`, `b`, `c`] | | |
| ::: | | |
The above table used to be the following. Now :::
is put into the table, making the whole section aftwards collapse into the <details>
.
:::details `ARGS` will be populated with a list of AST nodes. Click to see details.
|Code|Match|
|---|----|
|`function foo(bar) { ... }` | [`bar`] |
|`function noop() {}` | [] |
|`function add(a, b, c) { ... }` | [`a`, `b`, `c`] |
:::
Metadata
Metadata
Assignees
Labels
No labels