Skip to content

Commit 86cfaa2

Browse files
committed
fix: CLI.md parsing for vitepress
1 parent bab2040 commit 86cfaa2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/documentation/docs/pages/CLI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ ui5 config
180180

181181
| Command | Description |
182182
| --- | --- |
183-
| ui5 config set <option> [value] | Set the value for a given configuration option. Clear an existing configuration by omitting the value |
184-
| ui5 config get <option> | Get the value for a given configuration option |
183+
| ui5 config set &lt;option&gt; [value] | Set the value for a given configuration option. Clear an existing configuration by omitting the value |
184+
| ui5 config get &lt;option&gt; | Get the value for a given configuration option |
185185
| ui5 config list | Display the current configuration |
186186

187187

scripts/generateCliDoc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,19 @@ function generateDoc() {
179179
commands: commandsArray
180180
});
181181

182-
content = content.split("&lt;").join("<").split("&gt;").join(">");
182+
content = content
183+
.split("&lt;").join("<")
184+
.split("&gt;").join(">")
185+
// Escape <option> as it's considered HTML tag to prevent rendering issues
186+
.replaceAll("<option>", "&lt;option&gt;");
183187
content = content.split("&#x3D;").join("=");
184188
try {
185189
writeFileSync("./packages/documentation/docs/pages/CLI.md", content);
186190
} catch (err) {
187191
console.error(`Failed to generate docs/pages/CLI.md: ${err.message}.`);
188192
throw err;
189193
}
190-
console.log("Generated docs/pages/CLI.md");
194+
console.log("Generated packages/documentation/docs/pages/CLI.md");
191195
}
192196

193197
function splitString(temp) {

0 commit comments

Comments
 (0)