Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/gen-commands.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('{', '&#123;')
.replaceAll('}', '&#125;')

export function renderWebsiteMdx(manifest, bin = BIN) {
const { commands, byTopic } = groupByTopic(manifest)
Expand Down
4 changes: 2 additions & 2 deletions website/src/content/docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ pdcli filter create [flags]
| --- | --- |
| `--name` &lt;value&gt; | Filter name |
| `--type` &lt;deals\|leads\|org\|people\|products\|activity\|projects&gt; | Filter type |
| `--conditions` &lt;value&gt; | 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` &lt;value&gt; | 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 &#123;"glue":"and","conditions":[&#123;"glue":"and",...&#125;,&#123;"glue":"or",...&#125;]&#125;. |

```bash
pdcli filter create --name "Open deals" --type deals --conditions @conditions.json
Expand All @@ -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 &#123;name, type, conditions&#125; 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]
Expand Down
Loading