Skip to content

Commit 44a4049

Browse files
authored
Merge pull request #75 from bitnami-labs/allow-description-in-skip-lines
Allow descriptions in skipped lines
2 parents f9eb5fd + a095544 commit 44a4049

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The following are the tags supported at this very moment:
101101

102102
- For a parameter: `## @param fullKeyPath [modifier?] Description`.
103103
- For a section: `## @section Section Title"`.
104-
- To skip an object and all its children: `## @skip fullKeyPath`.
104+
- To skip an object and all its children: `## @skip fullKeyPath Description?`.
105105
- To add a description for an intermediate object (i.e. not final in the YAML tree): `## @extra fullkeyPath Description`.
106106

107107
All the tags as well as the two initial `#` characters for the comments style can be configured in the [configuration file](#configuration-file).

lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function parseMetadataComments(valuesFilePath, config) {
3232
const descriptionStartRegex = new RegExp(`^\\s*${config.comments.format}\\s*${config.tags.descriptionStart}\\s*(.*)`);
3333
const descriptionContentRegex = new RegExp(`^\\s*${config.comments.format}\\s*(.*)`);
3434
const descriptionEndRegex = new RegExp(`^\\s*${config.comments.format}\\s*${config.tags.descriptionEnd}\\s*(.*)`);
35-
const skipRegex = new RegExp(`^\\s*${config.comments.format}\\s*${config.tags.skip}\\s*(.*)$`);
35+
const skipRegex = new RegExp(`^\\s*${config.comments.format}\\s*${config.tags.skip}\\s*([^\\s]+)\\s*(.*)$`);
3636
const extraRegex = new RegExp(`^\\s*${config.comments.format}\\s*${config.tags.extra}\\s*([^\\s]+)\\s*(\\[.*?\\])?\\s*(.*)$`);
3737

3838
// We assume there will always be a section before any parameter. At least one section is required

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitnami/readme-generator-for-helm",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"description": "Autogenerate READMEs tables and OpenAPI schemas for Helm Charts",
55
"main": "index.js",
66
"scripts": {

tests/test-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ containerSecurityContext:
249249
## Kubewatch resource requests and limits
250250
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
251251
##
252-
## @skip resources
252+
## @skip resources Optional description
253253
## @disabled-param resources.limits The resources limits for the Kubewatch container
254254
## @disabled-param resources.requests The requested resources for the Kubewatch container
255255
##

0 commit comments

Comments
 (0)