1

Unsure where to ask as I'm not 100% sure if this is a bug or intended or if I'm just missing something, but I'm currently writing some documentation (using VuePress) for a platform that uses handlebars.

I've found if I put handlebars markup within a inline code block, for example:

This can be very useful as an alternative to using the regular partial `{{> @name }}` helper to import sub-components.

with this I get the error:

invalid expression: Unexpected token > in
_s(> @name)
Raw expression: {{> @name }}

However, if i just simply do something like:

Here is an example `{{ name }}`

I get no errors, however, whatever is inside the {{ }} doesn't render on the front-end

Am I missing something or is there a suggested method of getting around this?

Thanks in advance

Note: This only happens in inline code examples, it works fine in full code blocks using the standard triple backtick approach

4

1 回答 1

0

对于其他遇到此问题的人......解决方案就在我面前 - https://vuepress.vuejs.org/guide/using-vue.html#escaping

于 2018-09-06T10:01:48.230 回答