Skip to content

Commit

Permalink
fix(UI): Link to code line issue with multiple code blocks
Browse files Browse the repository at this point in the history
fix #466
  • Loading branch information
vogloblinsky committed Mar 8, 2018
1 parent abc9d31 commit aec0014
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/resources/js/sourceCode.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
var $tabSource = document.querySelector('#source-tab'),
$prismPre = document.querySelector('pre');
$prismPre = document.querySelector('pre.compodoc-sourcecode');
if ($prismPre) {
$prismCode = $prismPre.querySelector('code'),
$content = document.querySelector('.content'),
Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/class.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ class.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ class.sourceCode}}</code></pre>
</div>
{{/unless}}
</div>
2 changes: 1 addition & 1 deletion src/templates/partials/component.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ component.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ component.sourceCode}}</code></pre>
</div>
{{/unless}}

Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/directive.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ directive.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ directive.sourceCode}}</code></pre>
</div>
{{/unless}}

Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/injectable.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{injectable.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{injectable.sourceCode}}</code></pre>
</div>
{{/unless}}

Expand Down
2 changes: 1 addition & 1 deletion src/templates/partials/interceptor.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{injectable.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{injectable.sourceCode}}</code></pre>
</div>
{{/unless}}
</div>
2 changes: 1 addition & 1 deletion src/templates/partials/interface.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ interface.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ interface.sourceCode}}</code></pre>
</div>
{{/unless}}
</div>
2 changes: 1 addition & 1 deletion src/templates/partials/module.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ module.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ module.sourceCode}}</code></pre>
</div>
{{/unless}}
</div>
2 changes: 1 addition & 1 deletion src/templates/partials/pipe.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

{{#unless disableSourceCode}}
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers"><code class="language-typescript">{{ pipe.sourceCode}}</code></pre>
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">{{ pipe.sourceCode}}</code></pre>
</div>
{{/unless}}

Expand Down

0 comments on commit aec0014

Please sign in to comment.