docs: add missing v-pre directive to Tera {{ }} expressions#8659
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the documentation by resolving conflicts between Tera template syntax ( Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Greptile SummaryThis is a documentation-only PR that fixes missing Key changes:
All escaping techniques used ( Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Tera `{{ }}` expression\nin prose documentation"] --> B{How many\noccurrences\nin the paragraph?}
B -- "Single" --> C["Replace backtick span\nwith `<code v-pre>…</code>`"]
B -- "Multiple" --> D["Wrap paragraph in\n`::: v-pre` / `:::` container"]
C --> E["VitePress renders correctly\nwithout Vue interpolation"]
D --> E
E --> F["Docs build succeeds ✓"]
Last reviewed commit: "docs: add missing `v..." |
There was a problem hiding this comment.
Code Review
This pull request adds the v-pre directive to Tera template expressions in several documentation files to prevent them from being interpreted by Vue. The changes use <code v-pre> for single instances and ::: v-pre containers for paragraphs with multiple instances. A missing closing curly brace in a code example in docs/templates.md is also fixed. The changes are consistent with the pull request's goal of improving documentation rendering.
|
|
||
| ### `bin_path` | ||
|
|
||
| ::: v-pre |
There was a problem hiding this comment.
Vitepress is new to me, but I think it's right. I just followed the escaping documentation: https://vuejs.github.io/vitepress/v1/guide/using-vue#escaping
The idea was to use a single v-pre rather than one for each template expression, which can be achieved using a span with v-pre over multiple expressions or the vitepress custom container that I used here.
I'm happy to change it to <code v-pre> for each expression or a single/multiple span(s), if the container approach doesn't work for you. Otherwise, what is it about it that looks wrong?
I've been using mise for a while now and I love it. So, I'm just happy to at least try and help improve it if I can, but I don't want to become a burden. 🙂
Also, here's a side-by-side to show the fix:

(Left is mise.jdx.dev)
Several places in the documentation refer to Tera templates (e.g.
{{ foo }}), which clash with Vue templates. Most of the places have been escaped correctly, using thev-predirective, but not all of them. This PR aims to fill that gap (though I might have missed some). It's pretty simple, but here's a breakdown of what I've done:<code v-pre>tags. For example, the following:becomes:
::: v-precustom containers from vitepress, mostly so it's still easy to read in an editor. For example, the following:becomes:
v-pres, I've stumbled upon a line that missing one of the closing curly-braces, indocs/templates.md, which I've fixed. It's not really related to the issue of this PR, but it seemed too small to go in a different one.