diff --git a/apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts b/apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts index 0050b7147ce..8c0aa44a30a 100644 --- a/apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts +++ b/apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts @@ -105,8 +105,10 @@ export class OfficeYamlDocumenter extends YamlDocumenter { // // Hyperlink it like this: // \[ [API set: ExcelApi 1.1](http://bing.com?type=excel) \] - markup = markup.replace(/Api/, 'API'); - return markup.replace(/\\\[(API set:[^\]]+)\\\]/, '\\[ [$1](' + this._getApiSetUrl(uid) + ') \\]'); + return markup.replace( + /\\\[[Aa][Pp][Ii] set:([^\]]+)\\\]/, + '\\[ [API set:$1](' + this._getApiSetUrl(uid) + ') \\]' + ); } // Gets the link to the API set based on product context. Seeks a case-insensitive match in the hash set. diff --git a/common/changes/@microsoft/api-documenter/AlexJ-APIDocumenterRegex_2025-06-20-17-45.json b/common/changes/@microsoft/api-documenter/AlexJ-APIDocumenterRegex_2025-06-20-17-45.json new file mode 100644 index 00000000000..2c0fa3cccc7 --- /dev/null +++ b/common/changes/@microsoft/api-documenter/AlexJ-APIDocumenterRegex_2025-06-20-17-45.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-documenter", + "comment": "Update regex in the OfficeYamlDocumenter to be case insensitive.", + "type": "patch" + } + ], + "packageName": "@microsoft/api-documenter" +} \ No newline at end of file