Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Question: Do curlies in always have to be escaped in prism, in a .hbs file?#436

Description

@amyrlam

馃憢 I made this repro hashicorp/flight#367, am wondering if this is a limitation of PrismJS or if you had any insights?

Curlies do not display (nothing displays in their place, no error):

<CodeBlock
  @language="markup"
  @code=' 
    <FlightIcon @name="zap" @size="24" @stretched={{true}} />
  '
/>

Curlies do not display, using https://prismjs.com/plugins/unescaped-markup/:

    <script type="text/plain" class="language-markup">
<FlightIcon @name="triangle-fill" @isInlineBlock={{false}} />
    </script>

This syntax does work for me:

<CodeBlock
  @language="markup"
  @code='
    <FlightIcon @name="triangle-fill" @isInlineBlock=&lbrace;&lbrace;false&rbrace;&rbrace; />
  '
/>

Aside: It seemed like there was better syntax highlighting using @language="markup" vs @language="markup".

If you have any insight please LMK!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions