aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-26 19:17:39 +0100
committerAleksey Kladov <[email protected]>2019-10-26 19:22:40 +0100
commitcf4720ffd5524f1ddda411e4810da8d97a0c593f (patch)
tree0c7309c896b50663418f6b45a0df36336d92fc43 /xtask
parent106004139375b64817145d8279cd7904a477c637 (diff)
use unicode bar for drawing the cursor
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/codegen/gen_assists_docs.rs8
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
109fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { 109fn 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 }