Skip to content

Commit 4c86c4e

Browse files
committed
fix: wrapper for latex rendering and adjust formatting
1 parent 9336ce9 commit 4c86c4e

File tree

8 files changed

+2009
-13537
lines changed

8 files changed

+2009
-13537
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ workflows:
102102
aws-secret-access-key: $OPS_AWS_SECRET_ACCESS_KEY
103103
account-url: $OPS_ECR_URL
104104
puller-account-ids: '["301258414863", "487088987264"]'
105+
docker-version: 20.10.2
105106
- datacamp-deploy/deploy: # Staging
106107
environment: staging
107108
aws-access-key-id: $STAGING_AWS_ACCESS_KEY_ID

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG NODE_VERSION=12.14-alpine3.9
1+
ARG NODE_VERSION=16.4-alpine3.11
22

33
FROM node:${NODE_VERSION} as dependencies
44

@@ -7,7 +7,7 @@ WORKDIR /usr/app
77
# First copy only package.json & yarn.lock and run yarn install, this will make
88
# docker cache these steps if those files didn't change
99
COPY package.json yarn.lock ./
10-
RUN yarn install
10+
RUN yarn install --frozen-lock-file
1111

1212
# Copy all the other source files we need to build
1313
COPY . .

components/Html.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
import { MathJax, MathJaxContext } from "better-react-mathjax";
2+
13
type Props = {
24
children: string;
35
className?: string;
46
};
57

68
export default function Html({ children, className }: Props) {
79
return (
8-
<span
9-
className={className}
10-
dangerouslySetInnerHTML={{ __html: children }}
11-
/>
10+
<MathJaxContext>
11+
<MathJax>
12+
<span
13+
className={className}
14+
dangerouslySetInnerHTML={{ __html: children }}
15+
/>
16+
</MathJax>
17+
</MathJaxContext>
18+
1219
);
1320
}

0 commit comments

Comments
 (0)