Skip to content

Commit

Permalink
TS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Aug 25, 2023
1 parent 7c7531c commit 1d26a47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-mdx-loader/src/remark/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import escapeHtml from 'escape-html';
import type {Parent} from 'unist';
import type {PhrasingContent, Heading} from 'mdast';
// @ts-expect-error: TODO see https://github.com/microsoft/TypeScript/issues/49721
import type {
MdxJsxAttribute,
MdxJsxAttributeValueExpression,
MdxJsxTextElement,
// @ts-expect-error: TODO see https://github.com/microsoft/TypeScript/issues/49721
} from 'mdast-util-mdx';

export function stringifyContent(
Expand Down Expand Up @@ -42,7 +42,7 @@ function mdxJsxTextElementToHtml(
attributes.find((attr) => attr.name === 'class');

const classAttributeString = classAttribute
? `class="${escapeHtml(classAttribute.value)}"`
? `class="${escapeHtml(String(classAttribute.value))}"`
: ``;

const allAttributes = classAttributeString ? ` ${classAttributeString}` : '';
Expand Down

0 comments on commit 1d26a47

Please sign in to comment.