Skip to content

Commit 06049e8

Browse files
committed
more diffs
1 parent e6ac14a commit 06049e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/generators/legacy-json/constants.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const DEFAULT_EXPRESSION = /\s*\*\*Default:\*\*\s*([^]+)$/i;
1212

1313
// Grabs the parameters from a method's signature
1414
// ex/ 'new buffer.Blob([sources[, options]])'.match(PARAM_EXPRESSION) === ['([sources[, options]])', '[sources[, options]]']
15-
export const PARAM_EXPRESSION = /\((.+)\);?$/;
15+
export const PARAM_EXPRESSION = /\(([^)]+)\);?$/;
1616

1717
// The plurals associated with each section type.
1818
export const SECTION_TYPE_PLURALS = {

src/utils/parser/constants.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const FUNCTION_CALL = '\\([^)]*\\)';
3737
// Matches "bar":
3838
// Group 1: foo[bar]
3939
// Group 2: foo.bar
40-
const PROPERTY = `${CAMEL_CASE}(?:(\\[${CAMEL_CASE}\\])|\\.(\\w+))`;
40+
const PROPERTY = `${CAMEL_CASE}(?:(\\[[^\\]]+\\])|\\.(\\w+))`;
4141

4242
// An array of objects defining the different types of API doc headings we want to
4343
// capture and their respective regex to match against the heading text.

0 commit comments

Comments
 (0)