diff --git a/common/changes/@uifabric/example-app-base/IButtonProps-docx_2018-12-05-00-06.json b/common/changes/@uifabric/example-app-base/IButtonProps-docx_2018-12-05-00-06.json new file mode 100644 index 0000000000000..14e86694cd411 --- /dev/null +++ b/common/changes/@uifabric/example-app-base/IButtonProps-docx_2018-12-05-00-06.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "@uifabric/example-app-base", + "comment": "Fix for issue#7258:Documentation is missing for button", + "type": "patch" + } + ], + "packageName": "@uifabric/example-app-base", + "email": "afhassan@microsoft.com" +} \ No newline at end of file diff --git a/packages/example-app-base/src/utilities/parser/Parse.ts b/packages/example-app-base/src/utilities/parser/Parse.ts index ee952b1bbc5a9..730e6b9b462c4 100644 --- a/packages/example-app-base/src/utilities/parser/Parse.ts +++ b/packages/example-app-base/src/utilities/parser/Parse.ts @@ -32,7 +32,7 @@ export function parse(source: string, propsInterfaceOrEnumName?: string): IPrope const escapedSource = source.replace(/\\(?!\\)/g, ''); if (propsInterfaceOrEnumName) { - regex = new RegExp(`^export (interface|(?:const )?enum) ${propsInterfaceOrEnumName}(?: extends .*?)? \\{( |.*[\\r\\n]*)*?\\}`, 'm'); + regex = new RegExp(`^export (interface|(?:const )?enum) ${propsInterfaceOrEnumName}(?:\\s*extends .*?)? \\{( |.*[\\r\\n]*)*?\\}`, 'm'); let regexResult = regex.exec(escapedSource); if (regexResult && regexResult.length > 0) { parseInfo = _parseEnumOrInterface(regexResult); @@ -46,7 +46,7 @@ export function parse(source: string, propsInterfaceOrEnumName?: string): IPrope ]; } } else { - regex = new RegExp(`^export (interface|(?:const )?enum) (\\S*?)(?: extends .*?)? \\{( |.*[\\r\\n]*)*?\\}`, 'gm'); + regex = new RegExp(`^export (interface|(?:const )?enum) (\\S*?)(?:\\s*extends .*?)? \\{( |.*[\\r\\n]*)*?\\}`, 'gm'); let regexResult: RegExpExecArray | null; let results: Array = []; while ((regexResult = regex.exec(escapedSource)) !== null) {