mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-14 12:50:30 +00:00
tabs: fix style for indented code blocks #550
This commit is contained in:
parent
822a913e83
commit
25e39cfe34
3 changed files with 9 additions and 10 deletions
static/js
|
@ -68,7 +68,7 @@ function adjustContentWidth(){
|
|||
function fixCodeTabs(){
|
||||
/* if only a single code block is contained in the tab and no style was selected, treat it like style=code */
|
||||
var codeTabPanels = Array.from( document.querySelectorAll( '.tab-content.tab-panel-style.initial' ) ).filter( function( tabPanel ){
|
||||
return tabPanel.querySelector( '.tab-content-text > div.highlight:only-child');
|
||||
return tabPanel.querySelector( '.tab-content-text > div.highlight:only-child, .tab-content-text > pre.pre-code:only-child');
|
||||
});
|
||||
|
||||
codeTabPanels.forEach( function( tabPanel ){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue