Skip to content

Commit ecc80f0

Browse files
fix: tweaks
1 parent cb6cf4b commit ecc80f0

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/markdown/cli-reference.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,23 @@ export class MarkdownCliReference extends MarkdownBase {
3030
lines.push('# Salesforce CLI Command Reference');
3131
lines.push('');
3232
lines.push(
33-
'This command reference contains information about the Salesforce CLI commands and their flags.' +
34-
' Use these commands to build Agentforce agents, manage Salesforce DX projects, create and manage' +
35-
' scratch orgs and sandboxes, synchronize source to and from orgs, create and install packages, and more.'
33+
'This command reference contains information about the Salesforce CLI commands and their flags. Use these commands to build Agentforce agents, manage Salesforce DX projects, create and manage scratch orgs and sandboxes, synchronize source to and from orgs, create and install packages, and more.'
3634
);
3735
lines.push('');
3836
lines.push(`Salesforce CLI version: \`${this.cliVersion}\``);
3937
lines.push('');
4038
if (this.pluginVersions.length > 0) {
4139
lines.push('## Plugin Versions');
4240
lines.push('');
41+
lines.push('<!-- prettier-ignore-start -->');
4342
lines.push('| Plugin | Version |');
4443
lines.push('|--------|---------|');
4544
for (const { name, version } of this.pluginVersions) {
4645
lines.push(`| \`${name}\` | \`${version}\` |`);
4746
}
4847
lines.push('');
48+
lines.push('<!-- prettier-ignore-end -->');
49+
lines.push('');
4950
}
5051
return Promise.resolve(lines.join('\n'));
5152
}

src/markdown/command.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,15 @@ export class MarkdownCommand extends MarkdownBase {
138138
if (parameters.length > 0) {
139139
lines.push('## Flags');
140140
lines.push('');
141+
lines.push('<!-- prettier-ignore-start -->');
141142
lines.push('| Flag | Description |');
142143
lines.push('|----------------------------------------|-------------|');
143144
for (const param of parameters) {
144145
lines.push(renderFlagRow(param));
145146
}
146147
lines.push('');
148+
lines.push('<!-- prettier-ignore-end -->');
149+
lines.push('');
147150
}
148151

149152
return lines.join('\n');
@@ -157,6 +160,8 @@ function escapeAngleBrackets(text: string): string {
157160
function applyCodeFormatting(text: string): string {
158161
// Wrap --flag-name tokens (not already in backticks)
159162
let result = text.replace(/(?<!`)--([\w-]+)(?!`)/g, '`--$1`');
163+
// Wrap glob patterns like *.cls, *.trigger (not already in backticks)
164+
result = result.replace(/(?<!`)\*(\.\w+)(?!`)/g, '`*$1`');
160165
// Wrap file/directory paths: must be preceded by whitespace or opening punctuation (not part of a URL)
161166
// Matches: ./foo/bar, ../foo, foo/bar/baz — but not https://foo/bar
162167
result = result.replace(/(^|(?<=[\s(["]))(?!https?:\/\/)((?:\.{1,2}\/|[\w][\w-]*\/)[\w./-]+)/g, '$1`$2`');

0 commit comments

Comments
 (0)