Skip to content

Commit

Permalink
Fix codeblocks semantic (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
MewenLeHo authored Jan 7, 2025
1 parent 3c1256d commit 306add7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ function highlightCodeBlocks() {
codeBlocks.forEach(function (codeBlock) {
const language = codeBlock.result.language
const displayLanguage = displayLanguageList[language] || language
const languageWrapper = document.createElement('div')
languageWrapper.classList.add('bg-primary', 'd-inline-block', 'p-2', 'font-weight-bold')
const languageWrapper = document.createElement('p')
languageWrapper.classList.add('bg-primary', 'd-inline-block', 'p-2', 'mb-0', 'font-weight-bold')
languageWrapper.textContent = displayLanguage

codeBlock.parentNode.insertBefore(languageWrapper, codeBlock)
Expand Down

0 comments on commit 306add7

Please sign in to comment.