summaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorChristoph Prokop <christoph.prokop@atos.net>2021-01-05 20:19:02 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-01-11 21:24:40 +0100
commita40013100f009dc5dceac2d89b73c08896780e74 (patch)
tree12e0d4cddffeb32a3dc4c668597d7ceaabed8c0e /Cargo.toml
parent5bb9b285d8c7b1071f955d0608fcc683c423ac31 (diff)
Fix: Remove indentation from script snippets when building script
We actually need to make an ugly (and very bad performing) hack here, to get the `unindent` crate to actually unindent here. text = format!("\n{}", text).unindent(), the format!() call is necessary to tell `unindent::Unindent::unindent()` that the intended indentation is actually zero. If we do not add that `\n` here, the first line of the to-be-unindented indented text stays unintentionally indented. For example, unindenting the intentionally indented string: " intentionally indented intentionally indented " results unintentionally in the partially indented and partially unindented text: " intentionally indented intentionally indented " Which is not our intention of course, although it seems to be the intention of the unindent crate, as documented. But with the intentionally added `\n` we unindent the indentation of all indented "intentionally indented" lines. Signed-off-by: Christoph Prokop <christoph.prokop@atos.net> Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Tested-by: Christoph Prokop <christoph.prokop@atos.net> Tested-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4cbd8d4..569cede 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,6 +45,7 @@ terminal_size = "0.1"
tokio = { version = "0.2", features = ["macros", "fs", "process", "io-util"] }
toml = "0.5"
typed-builder = "0.7"
+unindent = "0.1"
url = { version = "2", features = ["serde"] }
uuid = { version = "0.6", features = ["serde", "v4"] }
walkdir = "2"