Skip to content

Commit 35de259

Browse files
authored
Use class for highlight selector (#1546)
1 parent b3cbd47 commit 35de259

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rdoc/generator/template/aliki/class.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
</details>
160160
</div>
161161
<div class="method-source-code" id="<%= method.html_name %>-source">
162-
<pre class="<%= method.source_language %>" data-language="<%= method.source_language %>"><%= method.markup_code %></pre>
162+
<pre class="<%= method.source_language %>"><%= method.markup_code %></pre>
163163
</div>
164164
<%- end %>
165165

lib/rdoc/generator/template/aliki/js/c_highlighter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
* Initialize C syntax highlighting on page load
277277
*/
278278
function initHighlighting() {
279-
const codeBlocks = document.querySelectorAll('pre[data-language="c"]');
279+
const codeBlocks = document.querySelectorAll('pre.c');
280280

281281
codeBlocks.forEach(block => {
282282
if (block.getAttribute('data-highlighted') === 'true') {

0 commit comments

Comments
 (0)