mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
feat(docs): Ensure multiline JS objects are rendered properly. (#13535)
This commit is contained in:
@@ -168,7 +168,23 @@ function renderSections(sections: Map<string, DocEntry[]>) {
|
||||
for (const entry of entries) {
|
||||
lines.push(`- **\`${entry.path}\`** (${entry.type}):`);
|
||||
lines.push(` - **Description:** ${entry.description}`);
|
||||
lines.push(` - **Default:** \`${escapeBackticks(entry.defaultValue)}\``);
|
||||
|
||||
if (entry.defaultValue.includes('\n')) {
|
||||
lines.push(' - **Default:**');
|
||||
lines.push('');
|
||||
lines.push(' ```json');
|
||||
lines.push(
|
||||
entry.defaultValue
|
||||
.split('\n')
|
||||
.map((line) => ` ${line}`)
|
||||
.join('\n'),
|
||||
);
|
||||
lines.push(' ```');
|
||||
} else {
|
||||
lines.push(
|
||||
` - **Default:** \`${escapeBackticks(entry.defaultValue)}\``,
|
||||
);
|
||||
}
|
||||
|
||||
if (entry.enumValues && entry.enumValues.length > 0) {
|
||||
const values = entry.enumValues
|
||||
|
||||
Reference in New Issue
Block a user