From cf4720ffd5524f1ddda411e4810da8d97a0c593f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Oct 2019 21:17:39 +0300 Subject: use unicode bar for drawing the cursor --- xtask/src/codegen/gen_assists_docs.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xtask/src/codegen') 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#####" } fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { - let mut buf = String::from("# Assists\n"); + let mut buf = String::from( + "# Assists\n\nCursor position or selection is signified by `┃` character.\n\n", + ); for assist in assists { + let before = assist.before.replace("<|>", "┃"); // Unicode pseudo-graphics bar + let after = assist.after.replace("<|>", "┃"); let docs = format!( " ## `{}` @@ -124,7 +128,7 @@ fn generate_docs(assists: &[Assist], mode: Mode) -> Result<()> { {} ``` ", - assist.id, assist.doc, assist.before, assist.after + assist.id, assist.doc, before, after ); buf.push_str(&docs); } -- cgit v1.2.3