docs: fix broken table in Format Syntax page#1107
docs: fix broken table in Format Syntax page#1107tralce wants to merge 2 commits intochhoumann:masterfrom
Conversation
|
Someone is attempting to deploy a commit to the Christian Bager Bach Houmann's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughDocumentation update to the FormatSyntax reference guide, adding a VDATE default-variant row and correcting pipe character escaping throughout the notes section to prevent formatting conflicts. No functional code changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/FormatSyntax.md`:
- 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.
| | `{{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. | |
There was a problem hiding this comment.
[\|] 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.
An improperly escaped pipe character (ironically in the section of VDATE that discusses escaping pipe characters) broke table rendering in both GitHub's markdown renderer and Docusaurus's, truncating important information about the VDATE syntax.
Summary by CodeRabbit