Skip to content

Commit ab08166

Browse files
committed
Extract TextContent component
This component uses the same styling rules as the `RenderedHtml` component, but does not require us to pass in `@html` as an argument. This allows us to use the same styling for our policy pages.
1 parent 03b6579 commit ab08166

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/components/rendered-html.hbs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
This component renders raw HTML. Be very careful with this since it
33
can enable cross-site scripting attacks!
44
--}}
5-
<div
6-
local-class="wrapper"
5+
<TextContent
76
...attributes
87
{{highlight-syntax selector="pre > code:not(.language-mermaid)"}}
98
{{render-mermaids}}
109
>
1110
{{html-safe @html}}
12-
</div>
11+
</TextContent>

app/components/text-content.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div local-class="wrapper" ...attributes>
2+
{{yield}}
3+
</div>

0 commit comments

Comments
 (0)