Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit 9efa97c

Browse files
rfougierneolitec
authored andcommitted
fix(markdown-renderer): fix code preview toggle feature
1 parent 662608a commit 9efa97c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

build/loaders/markdown-renderer.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ export default class extends marked.Renderer {
4747
this.codeBlockUID += 1
4848
var scopeVariableName = `$markdown.code[${this.codeBlockUID}]`
4949

50-
return `<div>${code}</div>
51-
<button type="button"
52-
class="oui-button oui-button_secondary"
50+
return `<div>${code}</div>
51+
<button type="button" class="oui-button oui-button_secondary"
5352
ng-click="${scopeVariableName} = !${scopeVariableName}">
5453
Click to show the example
5554
</button>
56-
<pre class="oui-showcase__code"
57-
ng-non-bindable
58-
ng-show="${scopeVariableName}">${highlightCode}</pre>`
55+
<div class="oui-showcase__code"
56+
ng-show="${scopeVariableName}">
57+
<pre ng-non-bindable>${highlightCode}</pre>
58+
</div>`
5959
} else {
6060
highlightCode = highlight.highlight(lang, code).value
6161
}

0 commit comments

Comments
 (0)