Skip to content

Commit 9b413de

Browse files
committed
Revert "fix: directly use code blocks to avoid a nasty bug in EC"
This reverts commit 708baaa.
1 parent 27c2655 commit 9b413de

File tree

6 files changed

+20
-146
lines changed

6 files changed

+20
-146
lines changed

src/components/Dependency.astro

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ dependencies {
4141
label: "Maven",
4242
lang: "xml",
4343
title: "pom.xml",
44-
code: `<dependency>
45-
<groupId>\{GROUP}</groupId>
46-
<artifactId>\{NAME}</artifactId>
47-
<version>\{VERSION}</version>
48-
</dependency>`,
44+
code: `<project>
45+
<dependencies>
46+
<dependency>
47+
<groupId>\{GROUP}</groupId>
48+
<artifactId>\{NAME}</artifactId>
49+
<version>\{VERSION}</version>
50+
</dependency>
51+
</dependencies>
52+
</project>`,
4953
},
5054
],
5155
"adventure-platform-mod": [

src/content/docs/adventure/migration/bungeecord-chat-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ being created that is a copy of the original component with the change you reque
134134
The BungeeCord Chat API includes three serializers. All three have equivalents in Adventure:
135135

136136
* The `TextComponent.fromLegacyText()` deserialization method is equivalent to the
137-
`deserialize` method of the [Legacy](/adventure/serializer/legacy) text serializer. Likewise, the
137+
`deserialize` method of the [Legacy](/adventure/serializer/legacy] text serializer. Likewise, the
138138
`BaseComponent.toLegacyText()` serialization method is equivalent to the `serialize`
139139
method on the legacy text serializer.
140140
* The `TextComponent.toPlainText()` serialization method is equivalent to the

src/content/docs/adventure/serializer/ansi.mdx

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ slug: adventure/serializer/ansi
44
description: Serializing components to ANSI.
55
---
66

7-
import { TabItem, Tabs } from "@astrojs/starlight/components";
87
import Dependency from "/src/components/Dependency.astro";
98
import { LATEST_ANSI_RELEASE, LATEST_ADVENTURE_API_RELEASE } from "/src/utils/versions";
109

@@ -58,40 +57,7 @@ converter for any kind of component, not just those by Adventure.
5857

5958
Declaring the dependency:
6059

61-
{/* TODO: Replace with Dependency component */}
62-
<Tabs syncKey="build-system">
63-
<TabItem label="Gradle (Kotlin)">
64-
```kts replace
65-
repositories {
66-
mavenCentral()
67-
}
68-
69-
dependencies {
70-
implementation("net.kyori:ansi:\{LATEST_ANSI_RELEASE}")
71-
}
72-
```
73-
</TabItem>
74-
<TabItem label="Gradle (Groovy)">
75-
```groovy replace
76-
repositories {
77-
mavenCentral()
78-
}
79-
80-
dependencies {
81-
implementation 'net.kyori:ansi:\{LATEST_ANSI_RELEASE}'
82-
}
83-
```
84-
</TabItem>
85-
<TabItem label="Maven">
86-
```xml replace
87-
<dependency>
88-
<groupId>net.kyori</groupId>
89-
<artifactId>ansi/artifactId>
90-
<version>\{LATEST_ANSI_RELEASE}</version>
91-
</dependency>
92-
```
93-
</TabItem>
94-
</Tabs>
60+
<Dependency group="net.kyori" name="ansi" version={LATEST_ANSI_RELEASE} />
9561

9662
### Implementation usage
9763

src/content/docs/adventure/serializer/gson.mdx

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ slug: adventure/serializer/gson
44
description: Serializing components to JSON with Gson.
55
---
66

7-
import { TabItem, Tabs } from "@astrojs/starlight/components";
7+
import Dependency from "/src/components/Dependency.astro";
8+
import { LATEST_ADVENTURE_API_RELEASE } from "/src/utils/versions";
89

910
The Gson text serializer converts chat components to their JSON representation
1011
and back using the Gson library. If you are interested in sending a chat component
@@ -17,40 +18,7 @@ component from an external source - serialization is done automatically by the
1718

1819
Declaring the dependency:
1920

20-
{/* TODO: Replace with Dependency component */}
21-
<Tabs syncKey="build-system">
22-
<TabItem label="Gradle (Kotlin)">
23-
```kts replace
24-
repositories {
25-
mavenCentral()
26-
}
27-
28-
dependencies {
29-
implementation("net.kyori:adventure-text-serializer-gson:\{LATEST_ADVENTURE_API_RELEASE}")
30-
}
31-
```
32-
</TabItem>
33-
<TabItem label="Gradle (Groovy)">
34-
```groovy replace
35-
repositories {
36-
mavenCentral()
37-
}
38-
39-
dependencies {
40-
implementation 'net.kyori:adventure-text-serializer-gson:\{LATEST_ADVENTURE_API_RELEASE}'
41-
}
42-
```
43-
</TabItem>
44-
<TabItem label="Maven">
45-
```xml replace
46-
<dependency>
47-
<groupId>net.kyori</groupId>
48-
<artifactId>adventure-text-serializer-gson</artifactId>
49-
<version>\{LATEST_ADVENTURE_API_RELEASE}</version>
50-
</dependency>
51-
```
52-
</TabItem>
53-
</Tabs>
21+
<Dependency group="net.kyori" name="adventure-text-serializer-gson" version={LATEST_ADVENTURE_API_RELEASE} />
5422

5523
## Usage
5624

src/content/docs/adventure/serializer/legacy.mdx

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ slug: adventure/serializer/legacy
44
description: (Deprecated) Serializing components to legacy format.
55
---
66

7-
import { TabItem, Tabs } from "@astrojs/starlight/components";
7+
import Dependency from "/src/components/Dependency.astro";
8+
import { LATEST_ADVENTURE_API_RELEASE } from "/src/utils/versions";
89

910
The legacy text serializer converts text to and from the traditional chat format used
1011
in Minecraft prior to Minecraft 1.7, and continues to be used to this day for its
@@ -19,40 +20,7 @@ using [MiniMessage](/adventure/minimessage).
1920

2021
Declaring the dependency:
2122

22-
{/* TODO: Replace with Dependency component */}
23-
<Tabs syncKey="build-system">
24-
<TabItem label="Gradle (Kotlin)">
25-
```kts replace
26-
repositories {
27-
mavenCentral()
28-
}
29-
30-
dependencies {
31-
implementation("net.kyori:adventure-text-serializer-legacy:\{LATEST_ADVENTURE_API_RELEASE}")
32-
}
33-
```
34-
</TabItem>
35-
<TabItem label="Gradle (Groovy)">
36-
```groovy replace
37-
repositories {
38-
mavenCentral()
39-
}
40-
41-
dependencies {
42-
implementation 'net.kyori:adventure-text-serializer-legacy:\{LATEST_ADVENTURE_API_RELEASE}'
43-
}
44-
```
45-
</TabItem>
46-
<TabItem label="Maven">
47-
```xml replace
48-
<dependency>
49-
<groupId>net.kyori</groupId>
50-
<artifactId>adventure-text-serializer-legacy</artifactId>
51-
<version>\{LATEST_ADVENTURE_API_RELEASE}</version>
52-
</dependency>
53-
```
54-
</TabItem>
55-
</Tabs>
23+
<Dependency group="net.kyori" name="adventure-text-serializer-legacy" version={LATEST_ADVENTURE_API_RELEASE} />
5624

5725
## Usage
5826

src/content/docs/adventure/serializer/plain.mdx

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ slug: adventure/serializer/plain
44
description: Retrieving plain text content from components.
55
---
66

7-
import { TabItem, Tabs } from "@astrojs/starlight/components";
7+
import Dependency from "/src/components/Dependency.astro";
8+
import { LATEST_ADVENTURE_API_RELEASE } from "/src/utils/versions";
89

910
The plain text serializer converts chat components to their plain-text representation
1011
and back. It is thus the simplest text serializer in Adventure. This serializer is
@@ -18,40 +19,7 @@ consider using [MiniMessage](/adventure/minimessage).
1819

1920
Declaring the dependency:
2021

21-
{/* TODO: Replace with Dependency component */}
22-
<Tabs syncKey="build-system">
23-
<TabItem label="Gradle (Kotlin)">
24-
```kts replace
25-
repositories {
26-
mavenCentral()
27-
}
28-
29-
dependencies {
30-
implementation("net.kyori:adventure-text-serializer-plain:\{LATEST_ADVENTURE_API_RELEASE}")
31-
}
32-
```
33-
</TabItem>
34-
<TabItem label="Gradle (Groovy)">
35-
```groovy replace
36-
repositories {
37-
mavenCentral()
38-
}
39-
40-
dependencies {
41-
implementation 'net.kyori:adventure-text-serializer-plain:\{LATEST_ADVENTURE_API_RELEASE}'
42-
}
43-
```
44-
</TabItem>
45-
<TabItem label="Maven">
46-
```xml replace
47-
<dependency>
48-
<groupId>net.kyori</groupId>
49-
<artifactId>adventure-text-serializer-plain</artifactId>
50-
<version>\{LATEST_ADVENTURE_API_RELEASE}</version>
51-
</dependency>
52-
```
53-
</TabItem>
54-
</Tabs>
22+
<Dependency group="net.kyori" name="adventure-text-serializer-plain" version={LATEST_ADVENTURE_API_RELEASE} />
5523

5624
## Usage
5725

0 commit comments

Comments
 (0)