Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

[not for merge] Curlies in ember-prism #367

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions website/app/templates/engineering.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@
<code class="ds-code">@stretched</code>
attribute:
{{! prettier-ignore-start }}
{{! template-lint-disable no-triple-curlies }}
<CodeBlock
@language="markup"
@code='
<FlightIcon @name="zap" @size="24" @stretched=&lbrace;&lbrace;true&rbrace;&rbrace; />
'
@code={{{'
<FlightIcon @name="zap" @size="24" @stretched={{true}} />
'}}}
/>
{{! prettier-ignore-start }}
{{! template-lint-enable no-triple-curlies }}
</p>

<p id="example-styles">
Expand All @@ -257,7 +259,18 @@
<i>block</i>, set
<code class="ds-code">@isInlineBlock</code>
to false:

<br /><br />Test the unescaped markup plugin, maybe curlies aren't honored by prismjs, unless escaped e.g.
`&lbrace;`?:

{{! template-lint-disable no-forbidden-elements }}
<script type="text/plain" class="language-markup">
<FlightIcon @name="triangle-fill" @isInlineBlock={{false}}
/>
</script>

{{! prettier-ignore-start }}
{{! this syntax for curlies works }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's I'm showing here:

image

<CodeBlock
@language="markup"
@code='
Expand Down
4 changes: 2 additions & 2 deletions website/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module.exports = function (defaults) {
},
'ember-prism': {
theme: 'funky',
components: ['markup', 'bash'], //needs to be an array, or undefined.
plugins: ['line-numbers', 'toolbar', 'copy-to-clipboard', 'autoloader'],
components: ['markup', 'bash'],
plugins: ['line-numbers', 'toolbar', 'copy-to-clipboard', 'autoloader', 'unescaped-markup'],
},
});

Expand Down