diff --git a/scripts/gen-commands.mjs b/scripts/gen-commands.mjs index 7702c37..0f4da79 100644 --- a/scripts/gen-commands.mjs +++ b/scripts/gen-commands.mjs @@ -77,12 +77,16 @@ const firstLine = (s) => .split('\n')[0] .trim() -// Escape MDX-significant chars: `|` breaks tables, bare `<`/`>` parse as JSX. +// Escape MDX-significant chars: `|` breaks tables, bare `<`/`>` parse as JSX, +// and a bare `{` opens a JSX expression (a literal `{name, type}` or a JSON +// `{"glue":...}` in a description otherwise fails the MDX build). const mdxSafe = (s) => firstLine(s) .replaceAll('|', '\\|') .replaceAll('<', '<') .replaceAll('>', '>') + .replaceAll('{', '{') + .replaceAll('}', '}') export function renderWebsiteMdx(manifest, bin = BIN) { const { commands, byTopic } = groupByTopic(manifest) diff --git a/website/src/content/docs/reference/commands.mdx b/website/src/content/docs/reference/commands.mdx index 5e4e580..c5ce7d6 100644 --- a/website/src/content/docs/reference/commands.mdx +++ b/website/src/content/docs/reference/commands.mdx @@ -1247,7 +1247,7 @@ pdcli filter create [flags] | --- | --- | | `--name` <value> | Filter name | | `--type` <deals\|leads\|org\|people\|products\|activity\|projects> | Filter type | -| `--conditions` <value> | Conditions JSON (a value, @file, or piped stdin). Fields are referenced by numeric field_id — run `pdcli filter helpers` for the valid operators. The blob needs the two-level glue structure {"glue":"and","conditions":[{"glue":"and",...},{"glue":"or",...}]}. | +| `--conditions` <value> | Conditions JSON (a value, @file, or piped stdin). Fields are referenced by numeric field_id — run `pdcli filter helpers` for the valid operators. The blob needs the two-level glue structure {"glue":"and","conditions":[{"glue":"and",...},{"glue":"or",...}]}. | ```bash pdcli filter create --name "Open deals" --type deals --conditions @conditions.json @@ -1273,7 +1273,7 @@ pdcli filter delete 5 --yes ### `pdcli filter export` -Export a filter (or all filters) as portable {name, type, conditions} JSON. To recreate it, feed the fields to `filter create` separately (the create command takes --name/--type/--conditions, not one blob). +Export a filter (or all filters) as portable {name, type, conditions} JSON. To recreate it, feed the fields to `filter create` separately (the create command takes --name/--type/--conditions, not one blob). ```text pdcli filter export [id] [flags]