We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6e3c6b commit 1334323Copy full SHA for 1334323
app/components/crate-readme.js
@@ -2,18 +2,12 @@ import Component from '@ember/component';
2
3
export default Component.extend({
4
rendered: '',
5
+
6
didRender() {
7
this._super(...arguments);
- this.$('pre > code').each(function() {
8
- window.Prism.highlightElement(this);
9
- });
10
- this.scrollToFragment();
11
- },
12
13
- scrollToFragment() {
14
- if (location.hash) {
15
- let anchor_id = location.hash.substr(1);
16
- document.getElementById(anchor_id).scrollIntoView();
17
- }
+ this.element.querySelectorAll('pre > code').forEach(function(node) {
+ window.Prism.highlightElement(node);
+ });
18
},
19
});
0 commit comments