Skip to content

Commit

Permalink
Une correction avec certains blocs Latex.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyost committed Dec 28, 2023
1 parent bf5ebaa commit 0bb1916
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions modules/api-v2-generator/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const formatHtml = (resolver: Resolver, contentDirectoryPath: string, les
const latex = math.getAttribute('data-latex')
if (latex) {
const display = math.getAttribute('data-latex-display') === 'true'
const mathTag = display ? `<math displaystyle>${latex}</math>` : `<math>${latex}</math>`
const mathTag = display ? `<div class="katex-display"><math displaystyle>${latex}</math></div>` : `<math>${latex}</math>`
math.replaceWith(mathTag)
}
}
Expand Down Expand Up @@ -337,14 +337,6 @@ export const formatHtml = (resolver: Resolver, contentDirectoryPath: string, les
}
}

// Modify table elements.
const tables = root.querySelectorAll('table')
for (const table of tables) {
table.classList.add('table')
table.classList.add('table-bordered')
table.classList.add('table-hover')
}

// Modify representation elements.
const representations = root.querySelectorAll('.representation')
for (let i = 0; i < representations.length; i++) {
Expand Down

0 comments on commit 0bb1916

Please sign in to comment.