diff options
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r-- | xtask/src/codegen/gen_assists_docs.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs index 8dca2ed06..0c4cf2152 100644 --- a/xtask/src/codegen/gen_assists_docs.rs +++ b/xtask/src/codegen/gen_assists_docs.rs | |||
@@ -107,9 +107,13 @@ r#####" | |||
107 | } | 107 | } |
108 | 108 | ||
109 | fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { | 109 | fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { |
110 | let mut buf = String::from("# Assists\n"); | 110 | let mut buf = String::from( |
111 | "# Assists\n\nCursor position or selection is signified by `┃` character.\n\n", | ||
112 | ); | ||
111 | 113 | ||
112 | for assist in assists { | 114 | for assist in assists { |
115 | let before = assist.before.replace("<|>", "┃"); // Unicode pseudo-graphics bar | ||
116 | let after = assist.after.replace("<|>", "┃"); | ||
113 | let docs = format!( | 117 | let docs = format!( |
114 | " | 118 | " |
115 | ## `{}` | 119 | ## `{}` |
@@ -124,7 +128,7 @@ fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { | |||
124 | {} | 128 | {} |
125 | ``` | 129 | ``` |
126 | ", | 130 | ", |
127 | assist.id, assist.doc, assist.before, assist.after | 131 | assist.id, assist.doc, before, after |
128 | ); | 132 | ); |
129 | buf.push_str(&docs); | 133 | buf.push_str(&docs); |
130 | } | 134 | } |