Skip to content

Commit eaa0b0b

Browse files
committed
Revert docs
1 parent 1d9a6d8 commit eaa0b0b

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

apps/web/content/docs/code/focus.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Focus blocks of code. Dim the unfocused code. Ensure the focused code is visible
1010

1111
Useful when you want to change a codeblock focus depending on the user's interaction.
1212

13-
The demo below uses `!focus(start)` and `!focus(end)` comments to define the focused range.
14-
1513
<Demo name="focus" />
1614

1715
## !implementation

apps/web/content/docs/concepts/annotations.mdx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,13 @@ We can use the `name` of those handlers as comments in the code to use the compo
4040

4141
## Annotation Comments
4242

43-
We use comments to annotate codeblocks. **The comment syntax depends on the language**. For example, in javascript we use `// !name(1:5)` or `// !name(start)`, but in python we use `# !name(1:5)` or `# !name(start)`. For JSON (that doesn't support comments), the recommendation is to instead use `jsonc` or `json5`, which support comments.
43+
We use comments to annotate codeblocks. **The comment syntax depends on the language**. For example, in javascript we use `// !name(1:5)`, but in python we use `# !name(1:5)`. For JSON (that doesn't support comments), the recommendation is to instead use `jsonc` or `json5`, which support comments.
4444

4545
In the previous example we can see the two types of annotations:
4646

47-
- **Block annotations** are applied to a block of lines. They can use parenthesis `()` to define the range of lines, or `!name(start)` / `!name(end)` comments to mark the beginning and end of the block. Numeric ranges are relative to the line where the comment is placed.
47+
- **Block annotations** are applied to a block of lines. They use parenthesis `()` to define the range of lines. The numbers are relative to the line where the comment is placed.
4848
- **Inline annotations** are applied to a group of tokens inside a line. They use square brackets `[]` to define the range of columns included in the annotation.
4949

50-
For example, these two block annotations are equivalent:
51-
52-
```js
53-
// !focus(1:2)
54-
const b = 2
55-
const c = 3
56-
```
57-
58-
```js
59-
// !focus(start)
60-
const b = 2
61-
const c = 3
62-
// !focus(end)
63-
```
64-
6550
## Annotation Query
6651

6752
Any extra content in the annotation comment is passed to the annotation components as `query`.

apps/web/demos/focus/content.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ function ipsum(ipsum, dolor = 1) {
99
return dolor
1010
}
1111

12-
// !focus(start)
12+
// !focus(1:5)
1313
function dolor(ipsum, dolor = 1) {
1414
const sit = ipsum == null ? 0 : ipsum.sit
1515
dolor = sit - amet(dolor)
1616
return sit ? consectetur(ipsum) : []
1717
}
18-
// !focus(end)
1918
```

0 commit comments

Comments
 (0)