Skip to content

Commit

Permalink
Change file extention and fix async function
Browse files Browse the repository at this point in the history
  • Loading branch information
P-Gill97 committed Dec 19, 2023
1 parent 6644d71 commit 5913104
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/ContentBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ContentBlock = ({ content, waitForEvent }: ContentBlockProps): JSX.
if (node != null) {
mathifyElement(node)
tooltipify(node).catch((error) => { console.error(error) })
stylify(node).catch((error) => { console.error(error) })
stylify(node)
}
}, [])

Expand Down
2 changes: 1 addition & 1 deletion src/lib/styles.tsx → src/lib/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const stylify = async (element: HTMLElement): Promise<void> => {
export const stylify = (element: HTMLElement): void => {
const accordionItems = element.querySelectorAll('.os-raise-accordion-item')

const setMaxHeight = (item: Element, content: HTMLElement): void => {
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const processPage = (): void => {
if (contentElements === 0) {
// Render blocks for Moodle storage
tooltipify(document.body).catch((error) => { console.error(error) })
stylify(document.body).catch((error) => { console.error(error) })
stylify(document.body)

Check warning on line 21 in src/main.tsx

View check run for this annotation

Codecov / codecov/patch

src/main.tsx#L21

Added line #L21 was not covered by tests
renderContentOnlyBlocks(document.body)
renderCTABlocks(document.body)
renderUserInputBlocks(document.body)
Expand Down
1 change: 0 additions & 1 deletion src/styles/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ table.os-raise-horizontaltable {
font-weight: bold;
border: none;
width: 100%;
cursor: pointer;
position: relative;
}

Expand Down

0 comments on commit 5913104

Please sign in to comment.