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
Can't get correct interpolation for codeblock in markdown. Followed approach with custom Vue component to inject markdown content via slot described below:
That works well for inline markdown within a Vue component. However, does not seem to work if interpolation is used within markdown codeblock. That prevents rendering source code which is stored elsewhere outside of markdown pages - metadata, front matter or external files.
{"samples": [{"title":"sample1","description": "descriptoin 1","code": "\nvar i = 1;\n"},{"title":"sample2","description": "descriptoin 2","code": "\nvar i = 2;\n"}]}
Later my markdown file:
// just preloaded mentioned JSON into themeConfig.samples variable
<divv-for="(item, index) in this.$site.themeConfig.samples">
{{ item.title }} with source code:
<MarkdownInVue>
## {{ item.title }}
{{ item.description }}
\~~~~
{{ item.code }}
\~~~~
\```
{{ item.code }}
\```
</MarkdownInVue>
</div>
Outcome:
Version
0.10.0
Steps to reproduce
As per setup early
What is expected?
Either of these:
VuePress allows interpolation within codeblock in markdown so that the source code can be rendered dynamically.
VuePress provides means to render source code from variable (which is stored elsewhere outside of markdown pages - metadata, front matter or external file)
What is actually happening?
VuePress skips interpolation for markdown codeblock.
Other relevant information
Your OS: Windows
Node.js version: v9.5.0
Is this a global or local install? - Global
Which package manager did you use for the install? - npm
The text was updated successfully, but these errors were encountered:
Bug report
Can't get correct interpolation for codeblock in markdown. Followed approach with custom Vue component to inject markdown content via slot described below:
That works well for inline markdown within a Vue component. However, does not seem to work if interpolation is used within markdown codeblock. That prevents rendering source code which is stored elsewhere outside of markdown pages - metadata, front matter or external files.
Then using directive over JSON data:
Later my markdown file:
Outcome:
Version
0.10.0
Steps to reproduce
As per setup early
What is expected?
Either of these:
What is actually happening?
VuePress skips interpolation for markdown codeblock.
Other relevant information
The text was updated successfully, but these errors were encountered: