Skip to content

Commit 50e9507

Browse files
committed
Removing unused match variables
1 parent bba412d commit 50e9507

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/utils/getMarkdownContent.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function getMarkdownContent() {
5252
// Extract all PlatformSection blocks
5353
const platformSectionRegex = /<PlatformSection\s+([^>]*)>([\s\S]*?)<\/PlatformSection>/g;
5454

55-
return content.replace(platformSectionRegex, (match, attributes, sectionContent) => {
55+
return content.replace(platformSectionRegex, (attributes, sectionContent) => {
5656
// Check if this section should be included or excluded based on SDK
5757
const supportedMatch = attributes.match(/supported=\{(\[[^\]]*\])\}/);
5858
const notSupportedMatch = attributes.match(/notSupported=\{(\[[^\]]*\])\}/);
@@ -108,7 +108,7 @@ export function getMarkdownContent() {
108108
// Extract all PlatformCategorySection blocks
109109
const platformCategorySectionRegex = /<PlatformCategorySection\s+([^>]*)>([\s\S]*?)<\/PlatformCategorySection>/g;
110110

111-
return content.replace(platformCategorySectionRegex, (match, attributes, sectionContent) => {
111+
return content.replace(platformCategorySectionRegex, (attributes, sectionContent) => {
112112
// Check if this section should be included or excluded based on SDK
113113
const supportedMatch = attributes.match(/supported=\{(\[[^\]]*\])\}/);
114114
const notSupportedMatch = attributes.match(/notSupported=\{(\[[^\]]*\])\}/);
@@ -157,7 +157,7 @@ export function getMarkdownContent() {
157157
// Match <PlatformContent includePath="path" /> patterns
158158
const platformContentRegex = /<PlatformContent\s+includePath="([^"]+)"\s*\/>/g;
159159

160-
return content.replace(platformContentRegex, (match, includePath) => {
160+
return content.replace(platformContentRegex, (includePath) => {
161161
try {
162162
// Platform content is organized by SDK in platform-includes directory
163163
const platformIncludesDir = path.join(process.cwd(), 'platform-includes', includePath);
@@ -234,19 +234,19 @@ export function getMarkdownContent() {
234234
const processPlatformTags = (content: string): string => {
235235
// Replace PlatformLink tags
236236
let processedContent = content.replace(/<PlatformLink\s+to="([^"]+)">([\s\S]*?)<\/PlatformLink>/g,
237-
(match, to, linkText) => `[${linkText}](${to})`);
237+
(to, linkText) => `[${linkText}](${to})`);
238238

239239
// Replace PlatformIdentifier tags
240240
processedContent = processedContent.replace(/<PlatformIdentifier\s+name="([^"]+)"[^>]*\/>/g,
241-
(match, name) => `\`${name}\``);
241+
(name) => `\`${name}\``);
242242

243243
// Replace Alert tags
244244
processedContent = processedContent.replace(/<Alert[^>]*>([\s\S]*?)<\/Alert>/g,
245-
(match, alertContent) => `> **Note**\n> ${alertContent.trim().replace(/\n/g, '\n> ')}`);
245+
(alertContent) => `> **Note**\n> ${alertContent.trim().replace(/\n/g, '\n> ')}`);
246246

247247
// Replace code blocks with tabTitle
248248
processedContent = processedContent.replace(/```([a-zA-Z]+)\s+\{tabTitle:\s*([^}]+)\}([\s\S]*?)```/g,
249-
(match, language, title, code) => `**${title.trim()}**\n\n\`\`\`${language}\n${code.trim()}\n\`\`\``);
249+
(language, title, code) => `**${title.trim()}**\n\n\`\`\`${language}\n${code.trim()}\n\`\`\``);
250250

251251
return processedContent;
252252
};
@@ -258,7 +258,7 @@ export function getMarkdownContent() {
258258
// First process regular includes
259259
const includeRegex = /<Include\s+name="([^"]+)"\s*\/>/g;
260260

261-
let processedContent = content.replace(includeRegex, (match, includeName) => {
261+
let processedContent = content.replace(includeRegex, (includeName) => {
262262
const includePath = path.join(process.cwd(), 'includes', includeName);
263263

264264
if (fs.existsSync(includePath)) {

0 commit comments

Comments
 (0)