Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2020-01-03 12:32:17 -0500
committerGitHub <noreply@github.com>2020-01-03 12:32:17 -0500
commitee820a3707b1004cc520536c8dad421d02cb3433 (patch)
tree547fe08ac3fcad61bff19bf555c45374a214dc27 /src
parent6031a58321d6f7558abd1de0d5fa8de0112f0af3 (diff)
Add link to doc for creating and using encyrpted secrets (#123)
Diffstat (limited to 'src')
-rw-r--r--src/misc/generate-docs.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/misc/generate-docs.ts b/src/misc/generate-docs.ts
index ee90d6f..884d606 100644
--- a/src/misc/generate-docs.ts
+++ b/src/misc/generate-docs.ts
@@ -65,9 +65,14 @@ function updateUsage(
let segment: string = description
if (description.length > width) {
segment = description.substr(0, width + 1)
- while (!segment.endsWith(' ')) {
+ while (!segment.endsWith(' ') && segment) {
segment = segment.substr(0, segment.length - 1)
}
+
+ // Trimmed too much?
+ if (segment.length < width * 0.67) {
+ segment = description
+ }
} else {
segment = description
}