diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-26 19:23:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-26 19:23:59 +0100 |
commit | 85984b09e182adca4b03d9f7efab20d48b5b632a (patch) | |
tree | 0c7309c896b50663418f6b45a0df36336d92fc43 /xtask | |
parent | 106004139375b64817145d8279cd7904a477c637 (diff) | |
parent | cf4720ffd5524f1ddda411e4810da8d97a0c593f (diff) |
Merge #2081
2081: use unicode bar for drawing the cursor r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask')
-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 | } |