From 03330fb5aa89b4fc2d8f753562899166ffe7c3d9 Mon Sep 17 00:00:00 2001
From: ιζΉε
η <1992414357@qq.com>
Date: Tue, 30 Jun 2026 18:04:12 +0800
Subject: docs: clean up code blocks and trailing whitespace in readme
---
README.md | 14 +++++---------
docs/_zh_CN/pages/other/features.md | 7 +++----
docs/pages/other/features.md | 7 +++----
3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 47e2e0f..a005a53 100644
--- a/README.md
+++ b/README.md
@@ -55,8 +55,6 @@
- π [docs.rs](https://docs.rs/mingling/latest/mingling/)
- π Helpdoc [EN](https://mingling-rs.github.io/mingling/docs/doc.html#/) [δΈζ](https://mingling-rs.github.io/mingling/docs/_zh_CN/index.html#/)
-
-
Getting Started
@@ -102,11 +100,11 @@ User Input β [Dispatcher] β Entry β [Chain(s)] β Result β [Renderer]
**Step4: Render** β A **Renderer** takes that result and writes it to the terminal.
> [!NOTE]
-> A Chain can produce a **State** type to be passed to the next Chain for further processing,
+> A Chain can produce a **State** type to be passed to the next Chain for further processing,
>
-> or it can produce a **Result** type to be handed off to a Renderer.
+> or it can produce a **Result** type to be handed off to a Renderer.
-Everything in this pipeline is a **plain Rust function** with an attribute macro on top.
+Everything in this pipeline is a **plain Rust function** with an attribute macro on top.
You never need to manually implement traits or construct boilerplate.
@@ -362,11 +360,9 @@ fn main() {
In your `build.rs`, generate the shell scripts:
```rust
+// BUILD TIME
// Features: ["comp", "builds"]
-
-fn main() {
- mingling::build::build_comp_scripts(env!("CARGO_PKG_NAME")).unwrap();
-}
+mingling::build::build_comp_scripts(env!("CARGO_PKG_NAME")).unwrap();
```
For enum-based completions, use `suggest_enum!`:
diff --git a/docs/_zh_CN/pages/other/features.md b/docs/_zh_CN/pages/other/features.md
index 8b19b31..bfd9efc 100644
--- a/docs/_zh_CN/pages/other/features.md
+++ b/docs/_zh_CN/pages/other/features.md
@@ -39,13 +39,12 @@ async fn handle_state_foo(foo: StateFoo) -> Next {
1. `comp` ηΉζ§δΈηθ‘₯ε
¨θζ¬ηζοΌ
```rust
+// BUILD TIME
// Features: ["builds", "comp"]
use mingling::build::build_comp_scripts;
-fn main() {
- // δΈΊ `myprogram` ηζθ‘₯ε
¨θζ¬
- build_comp_scripts("myprogram").unwrap();
-}
+// δΈΊ `myprogram` ηζθ‘₯ε
¨θζ¬
+build_comp_scripts("myprogram").unwrap();
```
## ηΉζ§ `clap`
diff --git a/docs/pages/other/features.md b/docs/pages/other/features.md
index 891083d..813ccdd 100644
--- a/docs/pages/other/features.md
+++ b/docs/pages/other/features.md
@@ -39,13 +39,12 @@ Enables scripts needed for use in `build.rs`, currently including:
1. Completion script generation under the `comp` feature:
```rust
+// BUILD TIME
// Features: ["builds", "comp"]
use mingling::build::build_comp_scripts;
-fn main() {
- // Generate completion scripts for `myprogram`
- build_comp_scripts("myprogram").unwrap();
-}
+// Generate completion scripts for `myprogram`
+build_comp_scripts("myprogram").unwrap();
```
## Feature `clap`
--
cgit