Skip to content

Commit d864b2d

Browse files
committed
fix: update generate command reference
1 parent e984eee commit d864b2d

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

src/commands/commandreference/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class CommandReferenceGenerate extends SfCommand {
3737
multiple: true,
3838
}),
3939
'ditamap-suffix': Flags.string({
40-
char: 'b',
40+
char: 's',
4141
description: messages.getMessage('ditamapSuffixFlagDescription'),
4242
default: Ditamap.SUFFIX,
4343
}),

src/ditamap/ditamap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ hb.registerHelper('join', (array) => array.join(', '));
2121
*/
2222
// tslint:disable-next-line: no-any
2323
hb.registerHelper('isCodeBlock', function (this: any, val, options) {
24-
return val.indexOf('sf') >= 0 || val.indexOf('sfdx') >= 0 || val.indexOf('$') >= 0 || val.indexOf('>>') >= 0
24+
return val.indexOf('sf') === 0 || val.indexOf('sfdx') === 0 || val.indexOf('$') >= 0 || val.indexOf('>>') >= 0
2525
? options.fn(this)
2626
: options.inverse(this);
2727
});

src/docs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export class Docs {
6565
return;
6666
}
6767
}
68-
await new CLIReferenceTopic(topic, description).write();
6968

7069
const subTopicNames = [];
7170
const commandIds = [];
@@ -118,6 +117,10 @@ export class Docs {
118117

119118
// The topic ditamap with all of the subtopic links.
120119
events.emit('subtopics', topic, subTopicNames);
120+
121+
if (commandIds.includes(topic)) {
122+
await new CLIReferenceTopic(topic, description).write();
123+
}
121124
await new TopicCommands(topic, topicMeta).write();
122125
await new TopicDitamap(topic, commandIds).write();
123126
return subTopicNames;

templates/command.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
5454
Trailblazer Community.</note>
5555
</section>{{/if}}{{#if isBetaCommand}}
5656
<section>
57-
<note>This feature is a Beta Service. Customers may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms (<xref href="{{trailblazerCommunityUrl}}" format="html" scope="external" type="new-window:HTML">https://www.salesforce.com/company/legal/agreements/</xref>).</note>
57+
<note>This feature is a Beta Service. Customers may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms (<xref href="https://www.salesforce.com/company/legal/agreements/" format="html" scope="external" type="new-window:HTML">https://www.salesforce.com/company/legal/agreements/</xref>).</note>
5858
</section>{{/if}}
5959
{{#if help}}
6060
<section>

templates/topic_ditamap.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
99
1010
-->
1111
<title><codeph otherprops="nolang">{{topic}}</codeph> Namespace</title>
12-
<topicref href="cli_reference_{{topic}}_commands.xml" type="concept" format="dita" scope="local">
12+
<topicref href="cli_reference_{{topic}}_commands.xml" type="concept" format="dita" scope="local" chunk="to-content" collection-type="unordered">
1313
{{#each commands}}
1414
<topicref href="cli_reference_{{command}}.xml" type="reference" format="dita" scope="local"/>
1515
{{/each}}

0 commit comments

Comments
 (0)