Skip to content

Commit a095544

Browse files
committed
Improve regex and documentation
Signed-off-by: Jota Martos <[email protected]>
1 parent cc64ecc commit a095544

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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 [Description?]`.
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*([^\\s]+)\\s*(\\[.*?\\])?\\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

0 commit comments

Comments
 (0)