Skip to content

Commit

Permalink
Merge pull request #13 from wuespace/better-md
Browse files Browse the repository at this point in the history
Add multi-paragraph description support to Markdown `docs` writer
  • Loading branch information
pklaschka authored Dec 8, 2024
2 parents 257b928 + 1881582 commit f5c4276
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ REQUIRED_VARIABLE=
# REQUIRED_VARIABLE=EXAMPLE_VALUE_1
# REQUIRED_VARIABLE=EXAMPLE_VALUE_2
#
# Multi-paragraph description of REQUIRED_VARIABLE_FILE
# REQUIRED_VARIABLE_FILE is a required variable that is used to store the path to a file
# that contains the value of the required variable. The file is mounted as a secret
# in the container. The value of the required variable is read from the file at runtime.
#
# The file should be mounted at the path specified by the REQUIRED_VARIABLE_FILE variable.
# REQUIRED_VARIABLE_FILE=/run/secrets/required_variable
4 changes: 2 additions & 2 deletions lib/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export function parse(
}

// Descriptions
if (currentLine.startsWith("# ")) {
if (currentLine.startsWith("#")) {
// A comment that isn't a variable definition is a description
ast.registerDescription(currentLine.slice(2));
ast.registerDescription(currentLine.slice(1).trim());
continue;
}
}
Expand Down

0 comments on commit f5c4276

Please sign in to comment.