diff --git a/source/js/code-block.js b/source/js/code-block.js index 43ab7ba..a8fad81 100644 --- a/source/js/code-block.js +++ b/source/js/code-block.js @@ -7,9 +7,9 @@ KEEP.initCodeBlockTools = () => { wrapper.appendChild(this) } - const {style: codeCopyStyle} = KEEP.theme_config?.code_copy || {} - const {style: codeBlockStyle} = KEEP.theme_config?.code_block || {} - const {style: codeBlockToolsStyle} = KEEP.theme_config?.code_block?.tools || {} + const { style: codeCopyStyle } = KEEP.theme_config?.code_copy || {} + const { style: codeBlockStyle } = KEEP.theme_config?.code_block || {} + const { style: codeBlockToolsStyle } = KEEP.theme_config?.code_block?.tools || {} const isMac = (codeCopyStyle || codeBlockStyle || codeBlockToolsStyle || 'default') === 'mac' const foldedIconClassName = isMac ? 'fas fa-chevron-left' : 'fas fa-chevron-right' diff --git a/source/js/main.js b/source/js/main.js index cf271e5..155332a 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -56,7 +56,11 @@ window.addEventListener('DOMContentLoaded', () => { KEEP.initLocalSearch() } - if (code_block?.tools?.enable === true || code_block?.enable === true || code_copy?.enable === true) { + if ( + code_block?.tools?.enable === true || + code_block?.enable === true || + code_copy?.enable === true + ) { KEEP.initCodeBlockTools() }