Skip to content
Open
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
4 changes: 2 additions & 2 deletions docs/docs/FormatSyntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Format syntax
| `{{DATE}}` | Outputs the current date in `YYYY-MM-DD` format. You could write `{{DATE+3}}` to offset the date with 3 days. You can use `+-3` to offset with `-3` days. |
| `{{DATE:<DATEFORMAT>}}` | Replace `<DATEFORMAT>` with a [Moment.js date format](https://momentjs.com/docs/#/displaying/format/). You could write `{{DATE<DATEFORMAT>+3}}` to offset the date with 3 days. |
| `{{VDATE:<variable name>, <date format>}}` | You'll get prompted to enter a date and it'll be parsed to the given date format. You could write 'today' or 'in two weeks' and it'll give you the date for that. Short aliases like `t` (today), `tm` (tomorrow), and `yd` (yesterday) are also supported and configurable in settings. Works like variables, so you can use the date in multiple places with different formats - enter once, format many times! Example: `{{VDATE:date,YYYY}}/{{VDATE:date,MM}}/{{VDATE:date,DD}}` |
| `{{VDATE:<variable name>, <date format>\|<default>}}` | Same as above, but with a default value. If you leave the prompt empty, the default value will be used instead. Example: `{{VDATE:date,YYYY-MM-DD\|today}}` will use "today" if no input is provided. Default values can be any natural language date like "tomorrow", "next monday", "+7 days", etc. Short aliases like `t`, `tm`, and `yd` work here too. **Note:** If your date format contains pipe characters (`|`), you'll need to escape them as `\|` or use square brackets like `[|]` to avoid conflicts with the default value separator. |
| `{{VDATE:<variable name>, <date format>\|<default>}}` | Same as above, but with a default value. If you leave the prompt empty, the default value will be used instead. Example: `{{VDATE:date,YYYY-MM-DD\|today}}` will use "today" if no input is provided. Default values can be any natural language date like "tomorrow", "next monday", "+7 days", etc. Short aliases like `t`, `tm`, and `yd` work here too. **Note:** If your date format contains pipe characters (`\|`), you'll need to escape them as `\\|` or use square brackets like `[\|]` to avoid conflicts with the default value separator. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

[\|] is unescaped plain text — still breaks the table column count.

The \| escaping inside backtick spans (e.g. `\|`, `\\|`) is correct, but the prose [\|] is not inside a code span. The | between the brackets is interpreted as a table-cell delimiter by both GFM and Docusaurus/remark, producing the extra (third) column that markdownlint is already flagging on this line (MD056: Expected: 2; Actual: 3).

Wrapping [\|] in backticks makes the pipe character inert:

🛠️ Proposed fix
-...or use square brackets like `[\|]` to avoid conflicts...
+...or use square brackets like `[\|]` to avoid conflicts...

More precisely, change the unquoted occurrence:

-use square brackets like [\|] to avoid
+use square brackets like `[\|]` to avoid
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 10-10: Table column count
Expected: 2; Actual: 3; Too many cells, extra data will be missing

(MD056, table-column-count)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs/FormatSyntax.md` at line 10, The table row containing the
`{{VDATE:<variable name>, <date format>\|<default>}}` example uses an unquoted
`[\|]` in prose which is being parsed as a table pipe; update that occurrence by
wrapping `[\|]` in backticks (e.g., replace `[\|]` with `` `[\|]` ``) so the
pipe is treated as literal text and the table column count (MD056) is fixed;
ensure the rest of the line still shows the escaped forms (`\|`, `\\|`)
unchanged.

| `{{VALUE}}` or `{{NAME}}` | Interchangeable. Represents the value given in an input prompt. If text is selected in the current editor, it will be used as the value. For Capture choices, selection-as-value can be disabled globally or per-capture. When using the QuickAdd API, this can be passed programmatically using the reserved variable name 'value'.<br/><br/>**Macro note:** `{{VALUE}}` / `{{NAME}}` are scoped per template step, so each template in a macro prompts independently. Use `{{VALUE:sharedName}}` when you want one prompt reused across the macro. |
| `{{VALUE:<variable name>}}` | You can now use variable names in values. They'll get saved and inserted just like values, but the difference is that you can have as many of them as you want. Use comma separation to get a suggester rather than a prompt.<br/><br/>If the same variable name appears in multiple macro steps, QuickAdd prompts once and reuses the value. |
| `{{VALUE:<variable name>\|label:<helper text>}}` | Adds helper text to the prompt for a single-value input. The helper appears below the header and is useful for reminders or instructions. For multi-value lists, use the same syntax to label the suggester (e.g., `{{VALUE:Red,Green,Blue\|label:Pick a color}}`). |
Expand All @@ -22,7 +22,7 @@ title: Format syntax
| `{{MACRO:<MACRONAME>\|label:<label>}}` | Executes the macro but shows the label as the placeholder when the macro prompts you to choose an export from a script object. This is helpful when multiple macro calls show similar lists. |
| `{{TEMPLATE:<TEMPLATEPATH>}}` | Include templates in your `format`. Supports Templater syntax. |
| `{{GLOBAL_VAR:<name>}}` | Inserts the value of a globally defined snippet from QuickAdd settings. Snippet values can include other QuickAdd tokens (e.g., `{{VALUE:...}}`, `{{VDATE:...}}`) and are processed by the usual formatter passes. Names match case‑insensitively in the token. |
| `{{MVALUE}}` | Math modal for writing LaTeX. Use CTRL + Enter to submit. |
| `{{MVALUE}}` | Math modal for writing LaTeX. Use CTRL + Enter to submit. |
| `{{FIELD:<FIELDNAME>}}` | Suggest the values of `FIELDNAME` anywhere `{{FIELD:FIELDNAME}}` is used. Fields are YAML fields, and the values represent any value this field has in your vault. If there exists no such field or value, you are instead prompted to enter one.<br/><br/>**Enhanced Filtering Options:**<br/>• `{{FIELD:fieldname\|folder:path/to/folder}}` - Only suggest values from files in specific folder<br/>• `{{FIELD:fieldname\|tag:tagname}}` - Only suggest values from files with specific tag<br/>• `{{FIELD:fieldname\|inline:true}}` - Include Dataview inline fields (fieldname:: value)<br/>• `{{FIELD:fieldname\|exclude-folder:templates}}` - Exclude values from files in specific folder<br/>• `{{FIELD:fieldname\|exclude-tag:deprecated}}` - Exclude values from files with specific tag<br/>• `{{FIELD:fieldname\|exclude-file:example.md}}` - Exclude values from specific file<br/>• `{{FIELD:fieldname\|default:Status - To Do}}` - Prepend a default suggestion; the modal placeholder shows it and pressing Enter accepts it.<br/>• `{{FIELD:fieldname\|default:Draft\|default-empty:true}}` - Only add the default when no matching values are found.<br/>• `{{FIELD:fieldname\|default:Draft\|default-always:true}}` - Keep the default first even if other suggestions exist.<br/>• Combine filters: `{{FIELD:fieldname\|folder:daily\|tag:work\|exclude-folder:templates\|inline:true}}`<br/>• Multiple exclusions: `{{FIELD:fieldname\|exclude-folder:templates\|exclude-folder:archive}}`<br/><br/>This is currently in beta, and the syntax can change—leave your thoughts [here](https://github.com/chhoumann/quickadd/issues/337). |
| `{{selected}}` | The selected text in the current editor. Will be empty if no active editor exists. |
| `{{CLIPBOARD}}` | The current clipboard content. Will be empty if clipboard access fails due to permissions or security restrictions. |
Expand Down