Skip to content

[api-documenter] Update regex in the OfficeYamlDocumenter to be case insensitive #5257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/api-documenter/src/documenters/OfficeYamlDocumenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}