Skip to content

Commit 641fcff

Browse files
committed
fix: replace 4 backticks with 3
1 parent b89066d commit 641fcff

File tree

10 files changed

+72
-55
lines changed

10 files changed

+72
-55
lines changed

src/content/docs/concept/size.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Dependent on whether you use the stable or nightly Rust toolchain the options av
1717

1818
<Tabs>
1919
<TabItem label="Stable">
20+
2021
```toml
2122
# src-tauri/Cargo.toml
2223
[profile.dev]
@@ -28,11 +29,12 @@ lto = true # Enables link-time-optimizations.
2829
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
2930
panic = "abort" # Higher performance by disabling panic handlers.
3031
strip = true # Ensures debug symbols are removed.
32+
```
3133

32-
````
3334
</TabItem>
3435

3536
<TabItem label="Nightly">
37+
3638
```toml
3739
# src-tauri/Cargo.toml
3840
[profile.dev]
@@ -47,7 +49,7 @@ panic = "abort" # Higher performance by disabling panic handlers.
4749
strip = true # Ensures debug symbols are removed.
4850
trim-paths = "all" # Removes potentially privileged information from your binaries.
4951
rustflags = ["-Cdebuginfo=0", "-Zthreads=8"] # Better compile performance.
50-
````
52+
```
5153

5254
</TabItem>
5355
</Tabs>

src/content/docs/ja/concept/size.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Stable 版(安定版)の Rust ツールチェーンを使用するか、Nigh
1717

1818
<Tabs>
1919
<TabItem label="Stable">
20+
2021
```toml
2122
# src-tauri/Cargo.toml
2223
[profile.dev]
@@ -28,11 +29,12 @@ lto = true # Enables link-time-optimizations.
2829
opt-level = "s" # Prioritizes small binary size. Use `3` if you prefer speed.
2930
panic = "abort" # Higher performance by disabling panic handlers.
3031
strip = true # Ensures debug symbols are removed.
32+
```
3133

32-
````
3334
</TabItem>
3435

3536
<TabItem label="Nightly">
37+
3638
```toml
3739
# src-tauri/Cargo.toml
3840
[profile.dev]
@@ -47,7 +49,7 @@ panic = "abort" # Higher performance by disabling panic handlers.
4749
strip = true # Ensures debug symbols are removed.
4850
trim-paths = "all" # Removes potentially privileged information from your binaries.
4951
rustflags = ["-Cdebuginfo=0", "-Zthreads=8"] # Better compile performance.
50-
````
52+
```
5153

5254
</TabItem>
5355
</Tabs>

src/content/docs/ja/develop/calling-rust.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn my_custom_command() {
3737
`lib.rs` ファイルに定義されたコマンドは、「[グルーコード](https://ja.wikipedia.org/wiki/グルーコード)生成」に対する制約のため、`pub`(パブリック/公開)として指定できません。
3838
「パブリック関数」として指定すると、次のようなエラーが表示されます:
3939

40-
````
40+
```
4141
error[E0255]: the name `__cmd__command_name` is defined multiple times 《`__cmd__command_name`という名称は複数定義されています》
4242
--> src/lib.rs:28:8
4343
|
@@ -48,6 +48,7 @@ error[E0255]: the name `__cmd__command_name` is defined multiple times 《`__c
4848
|
4949
= note: `__cmd__command_name` must be defined only once in the macro namespace of this module 《注記: `__cmd__command_name` はこのモジュールのマクロ名前空間に一度だけ定義できます》
5050
```
51+
5152
:::
5253

5354
コマンドのリストは、次のように、「ビルダー」関数に提供する必要があります。
@@ -60,7 +61,7 @@ pub fn run() {
6061
.run(tauri::generate_context!())
6162
.expect("error while running tauri application");
6263
}
63-
````
64+
```
6465

6566
これで、JavaScript コードからコマンドを呼び出すことができます。
6667

src/content/docs/ja/start/prerequisites.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,10 @@ $VERSION = Get-ChildItem -Name "$env:LocalAppData\Android\Sdk\ndk"
332332
PowerShell は、再起動またはログアウトするまで、新しい環境変数の設定が有効になりませんが、
333333
現在のセッションを更新することはできます:
334334

335-
````ps
335+
```ps
336336
[System.Environment]::GetEnvironmentVariables("User").GetEnumerator() | % { Set-Item -Path "Env:\$($_.key)" -Value $_.value }
337+
```
338+
337339
:::
338340

339341
</TabItem>
@@ -344,7 +346,7 @@ PowerShell は、再起動またはログアウトするまで、新しい環境
344346

345347
```sh
346348
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
347-
````
349+
```
348350

349351
次のステップ: [iOS 用の設定](#ios) または [プロジェクトの作成](/ja/start/create-project/)
350352

src/content/docs/ko/concept/size.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Stable 버전(안정판)의 Rust 툴체인을 사용하는지, Nightly 버전(
1717

1818
<Tabs>
1919
<TabItem label="Stable">
20+
2021
```toml
2122
# src-tauri/Cargo.toml
2223
[profile.dev]
@@ -28,11 +29,12 @@ lto = true # 링크 타임 최적화를 활성화합니다.
2829
opt-level = "s" # 작은 바이너리 크기를 우선시합니다. 속도를 선호하는 경우 `3`을 사용하십시오.
2930
panic = "abort" # 패닉 핸들러를 비활성화하여 성능을 향상시킵니다.
3031
strip = true # 디버그 심볼이 제거되도록 합니다.
32+
```
3133

32-
````
3334
</TabItem>
3435

3536
<TabItem label="Nightly">
37+
3638
```toml
3739
# src-tauri/Cargo.toml
3840
[profile.dev]
@@ -47,7 +49,7 @@ panic = "abort" # 패닉 핸들러를 비활성화하여 성능을 향상시킵
4749
strip = true # 디버그 심볼이 제거되도록 합니다.
4850
trim-paths = "all" # 바이너리에서 잠재적으로 권한 있는 정보를 제거합니다.
4951
rustflags = ["-Cdebuginfo=0", "-Zthreads=8"] # 더 나은 컴파일 성능.
50-
````
52+
```
5153

5254
</TabItem>
5355
</Tabs>

src/content/docs/ko/develop/calling-rust.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn my_custom_command() {
3737
`lib.rs` 파일에 정의된 명령은 "[글루 코드](https://ko.wikipedia.org/wiki/글루_코드) 생성"에 대한 제약 때문에 `pub`(공개)으로 지정할 수 없습니다.
3838
"공개 함수"로 지정하면 다음과 같은 오류가 표시됩니다:
3939

40-
````
40+
```
4141
error[E0255]: the name `__cmd__command_name` is defined multiple times 《`__cmd__command_name`이라는 이름이 여러 번 정의되었습니다》
4242
--> src/lib.rs:28:8
4343
|
@@ -48,6 +48,7 @@ error[E0255]: the name `__cmd__command_name` is defined multiple times 《`__cmd
4848
|
4949
= note: `__cmd__command_name` must be defined only once in the macro namespace of this module 《참고: `__cmd__command_name`은 이 모듈의 매크로 네임스페이스에 한 번만 정의해야 합니다》
5050
```
51+
5152
:::
5253

5354
명령 목록은 다음과 같이 "빌더" 함수에 제공해야 합니다.
@@ -60,7 +61,7 @@ pub fn run() {
6061
.run(tauri::generate_context!())
6162
.expect("error while running tauri application");
6263
}
63-
````
64+
```
6465

6566
이제 JavaScript 코드에서 명령을 호출할 수 있습니다.
6667

src/content/docs/plugin/sql.mdx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,48 +154,51 @@ We use [sqlx](https://docs.rs/sqlx/latest/sqlx/) as the underlying library and a
154154
<Tabs syncKey='SQLvariant'>
155155
<TabItem label="SQLite">
156156
Use the "$#" syntax when substituting query data
157+
157158
```javascript
158159
const result = await db.execute(
159-
"INSERT into todos (id, title, status) VALUES ($1, $2, $3)",
160-
[todos.id, todos.title, todos.status],
160+
'INSERT into todos (id, title, status) VALUES ($1, $2, $3)',
161+
[todos.id, todos.title, todos.status]
161162
);
162163

163164
const result = await db.execute(
164-
"UPDATE todos SET title = $1, status = $2 WHERE id = $3",
165-
[todos.title, todos.status, todos.id],
165+
'UPDATE todos SET title = $1, status = $2 WHERE id = $3',
166+
[todos.title, todos.status, todos.id]
166167
);
168+
```
167169

168-
````
169170
</TabItem>
170171
<TabItem label="MySQL">
171172
Use "?" when substituting query data
173+
172174
```javascript
173175
const result = await db.execute(
174-
"INSERT into todos (id, title, status) VALUES (?, ?, ?)",
175-
[todos.id, todos.title, todos.status],
176+
'INSERT into todos (id, title, status) VALUES (?, ?, ?)',
177+
[todos.id, todos.title, todos.status]
176178
);
177179

178180
const result = await db.execute(
179-
"UPDATE todos SET title = ?, status = ? WHERE id = ?",
180-
[todos.title, todos.status, todos.id],
181+
'UPDATE todos SET title = ?, status = ? WHERE id = ?',
182+
[todos.title, todos.status, todos.id]
181183
);
182-
````
184+
```
183185

184186
</TabItem>
185187
<TabItem label="PostgreSQL">
186188
Use the "$#" syntax when substituting query data
189+
187190
```javascript
188191
const result = await db.execute(
189-
"INSERT into todos (id, title, status) VALUES ($1, $2, $3)",
190-
[todos.id, todos.title, todos.status],
192+
'INSERT into todos (id, title, status) VALUES ($1, $2, $3)',
193+
[todos.id, todos.title, todos.status]
191194
);
192195

193196
const result = await db.execute(
194-
"UPDATE todos SET title = $1, status = $2 WHERE id = $3",
195-
[todos.title, todos.status, todos.id],
197+
'UPDATE todos SET title = $1, status = $2 WHERE id = $3',
198+
[todos.title, todos.status, todos.id]
196199
);
200+
```
197201

198-
````
199202
</TabItem>
200203
</Tabs>
201204

@@ -218,7 +221,7 @@ let migration = Migration {
218221
sql: "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);",
219222
kind: MigrationKind::Up,
220223
};
221-
````
224+
```
222225

223226
Or if you want to use SQL from a file, you can include it by using `include_str!`:
224227

src/content/docs/zh-cn/concept/size.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
1717

1818
<Tabs>
1919
<TabItem label="Stable">
20+
2021
```toml
2122
# src-tauri/Cargo.toml
2223
[profile.dev]
@@ -28,11 +29,12 @@ lto = true # 启用链接时优化。
2829
opt-level = "s" # 优先考虑小的二进制文件大小。如果您更喜欢速度,请使用 `3`。
2930
panic = "abort" # 通过禁用 panic 处理程序来提高性能。
3031
strip = true # 确保移除调试符号。
32+
```
3133

32-
````
3334
</TabItem>
3435

3536
<TabItem label="Nightly">
37+
3638
```toml
3739
# src-tauri/Cargo.toml
3840
[profile.dev]
@@ -47,7 +49,7 @@ panic = "abort" # 通过禁用 panic 处理程序来提高性能。
4749
strip = true # 确保移除调试符号。
4850
trim-paths = "all" # 从您的二进制文件中移除潜在的特权信息。
4951
rustflags = ["-Cdebuginfo=0", "-Zthreads=8"] # 提高编译性能。
50-
````
52+
```
5153

5254
</TabItem>
5355
</Tabs>

src/content/docs/zh-cn/plugin/sql.mdx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,21 @@ await db.execute('INSERT INTO ...');
9292

9393
</TabItem>
9494
<TabItem label="MySQL">
95-
```javascript
9695

96+
```javascript
9797
import Database from '@tauri-apps/plugin-sql';
9898
const db = await Database.load('mysql://user:pass@host/database');
9999
await db.execute('INSERT INTO ...');
100+
```
100101

101-
````
102102
</TabItem>
103103
<TabItem label="PostgreSQL">
104-
```javascript
105104

106-
import Database from "@tauri-apps/plugin-sql";
107-
const db = await Database.load("postgres://postgres:password@localhost/test");
108-
await db.execute("INSERT INTO ...");
109-
110-
````
105+
```javascript
106+
import Database from '@tauri-apps/plugin-sql';
107+
const db = await Database.load('postgres://postgres:password@localhost/test');
108+
await db.execute('INSERT INTO ...');
109+
```
111110

112111
</TabItem>
113112
</Tabs>
@@ -119,48 +118,51 @@ await db.execute("INSERT INTO ...");
119118
<Tabs syncKey="SQLvariant">
120119
<TabItem label="SQLite">
121120
在替换查询数据时使用 "$#" 语法
121+
122122
```javascript
123123
const result = await db.execute(
124-
"INSERT into todos (id, title, status) VALUES ($1, $2, $3)",
125-
[todos.id, todos.title, todos.status],
124+
'INSERT into todos (id, title, status) VALUES ($1, $2, $3)',
125+
[todos.id, todos.title, todos.status]
126126
);
127127

128128
const result = await db.execute(
129-
"UPDATE todos SET title = $1, status = $2 WHERE id = $3",
130-
[todos.title, todos.status, todos.id],
129+
'UPDATE todos SET title = $1, status = $2 WHERE id = $3',
130+
[todos.title, todos.status, todos.id]
131131
);
132+
```
132133

133-
````
134134
</TabItem>
135135
<TabItem label="MySQL">
136136
在替换查询数据时使用 "?" 语法
137+
137138
```javascript
138139
const result = await db.execute(
139-
"INSERT into todos (id, title, status) VALUES (?, ?, ?)",
140-
[todos.id, todos.title, todos.status],
140+
'INSERT into todos (id, title, status) VALUES (?, ?, ?)',
141+
[todos.id, todos.title, todos.status]
141142
);
142143

143144
const result = await db.execute(
144-
"UPDATE todos SET title = ?, status = ? WHERE id = ?",
145-
[todos.title, todos.status, todos.id],
145+
'UPDATE todos SET title = ?, status = ? WHERE id = ?',
146+
[todos.title, todos.status, todos.id]
146147
);
147-
````
148+
```
148149

149150
</TabItem>
150151
<TabItem label="PostgreSQL">
151152
在替换查询数据时使用 "$#" 语法
153+
152154
```javascript
153155
const result = await db.execute(
154-
"INSERT into todos (id, title, status) VALUES ($1, $2, $3)",
155-
[todos.id, todos.title, todos.status],
156+
'INSERT into todos (id, title, status) VALUES ($1, $2, $3)',
157+
[todos.id, todos.title, todos.status]
156158
);
157159

158160
const result = await db.execute(
159-
"UPDATE todos SET title = $1, status = $2 WHERE id = $3",
160-
[todos.title, todos.status, todos.id],
161+
'UPDATE todos SET title = $1, status = $2 WHERE id = $3',
162+
[todos.title, todos.status, todos.id]
161163
);
164+
```
162165

163-
````
164166
</TabItem>
165167
</Tabs>
166168

@@ -184,7 +186,7 @@ let migration = Migration {
184186
sql: "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);",
185187
kind: MigrationKind::Up,
186188
};
187-
````
189+
```
188190

189191
### 向插件构建器添加迁移
190192

src/content/docs/zh-cn/plugin/window-state.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import PluginPermissions from '@components/PluginPermissions.astro';
4949

5050
2. 修改 `lib.rs` 来初始化插件。
5151

52-
````rust title="src-tauri/src/lib.rs" ins={4}
52+
```rust title="src-tauri/src/lib.rs" ins={4}
5353
#[cfg_attr(mobile, tauri::mobile_entry_point)]
5454
pub fn run() {
5555
tauri::Builder::default()

0 commit comments

Comments
 (0)