Skip to content

Commit f5c4276

Browse files
authored
Merge pull request #13 from wuespace/better-md
Add multi-paragraph description support to Markdown `docs` writer
2 parents 257b928 + 1881582 commit f5c4276

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ REQUIRED_VARIABLE=
2424
# REQUIRED_VARIABLE=EXAMPLE_VALUE_1
2525
# REQUIRED_VARIABLE=EXAMPLE_VALUE_2
2626
#
27+
# Multi-paragraph description of REQUIRED_VARIABLE_FILE
28+
# REQUIRED_VARIABLE_FILE is a required variable that is used to store the path to a file
29+
# that contains the value of the required variable. The file is mounted as a secret
30+
# in the container. The value of the required variable is read from the file at runtime.
31+
#
32+
# The file should be mounted at the path specified by the REQUIRED_VARIABLE_FILE variable.
2733
# REQUIRED_VARIABLE_FILE=/run/secrets/required_variable

lib/parse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ export function parse(
5858
}
5959

6060
// Descriptions
61-
if (currentLine.startsWith("# ")) {
61+
if (currentLine.startsWith("#")) {
6262
// A comment that isn't a variable definition is a description
63-
ast.registerDescription(currentLine.slice(2));
63+
ast.registerDescription(currentLine.slice(1).trim());
6464
continue;
6565
}
6666
}

0 commit comments

Comments
 (0)