Skip to content

Allow authors to use render syntax with curly braces {{ content }} #1206

Description

@crphang

Currently authors have no way to render {{ content }} easily due to Vue. The only workaround is adding appropriate span tags

<span>{</span>{ content <span>}</span>}.

Rendering such syntax could be required for certain authors attempting to teach various Domain Specific Language that could contain such syntax, one example is Latex.

With work on #1049 and #1047, MarkBind currently allows special tags that retains curly braces instead of being removed from Nunjucks over repeated rendering if {% raw %} {% endraw%} is being used. However, due to Vue, we are still unable to render {{ }} as it is being used for interpolation. See: vuejs/vue#4223.

A possible experience to overcome that would be to introduce a new plugin:

<escape>
{%raw%}
{{ any content }} 
{%endraw%}
</escape>

Would be even better if <escape> automatically adds required nunjucks escaping.

References and potential solution:

#1049 (comment)

For general use, we could create a special component, something like that acts the same as a in addition to appending {% raw %} {% endraw %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions