You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to bind value of the frontmatter doc in the frontmatter component.
---
title: The title
---
::alert
---
type:
- :nested: title:type2: title
---
slot::
What is actually happening?
First, it works only for root keys, not for nested keys. You can see the result on the repro.
The value of the key :type2 is well replaced by The title, but not the :nested value.
Second, there are 2 problems when we compile the AST to markdown :
The binded root key :type2 is replaced by type2.
The binded nested key :nested is single quoted to ':nested'. Starting a key with : is valid in Yaml, it should not be quoted.
For the first problem, it seems it comes from this line, but if I comment this line, :type2 become single quoted.
Steps to reproduce
Launch vitest on my fork.
Additional information
Checklist
I have tested with the latest Nuxt version and the issue still occurs
I have tested with the latest module version and the issue still occurs
I have searched the issue tracker and this issue hasn't been reported yet
Steps to reproduce
What is expected?
Permit binding nested value.
Keep : of root bind value.
Don't use single quote as it's valid with Yaml.
What is actually happening?
The text was updated successfully, but these errors were encountered:
Version
module: 3.0.2
nuxt: last
Reproduction
Link:
What is expected?
I want to bind value of the frontmatter doc in the frontmatter component.
What is actually happening?
First, it works only for root keys, not for nested keys. You can see the result on the repro.
The value of the key
:type2
is well replaced byThe title
, but not the:nested
value.Second, there are 2 problems when we compile the AST to markdown :
:type2
is replaced bytype2
.:nested
is single quoted to':nested'
. Starting a key with:
is valid in Yaml, it should not be quoted.For the first problem, it seems it comes from this line, but if I comment this line,
:type2
become single quoted.Steps to reproduce
Launch vitest on my fork.
Additional information
Checklist
Steps to reproduce
What is expected?
:
of root bind value.What is actually happening?
The text was updated successfully, but these errors were encountered: