Skip to content

Commit

Permalink
fix: ts error; remove attributify-mode class
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 committed Sep 13, 2023
1 parent d53a63c commit 694cd9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export default (props: Props) => {
const parser = new DOMParser()
const doc = parser.parseFromString(match, 'text/html')
const codeElement = doc.querySelector('code')
const code = codeElement ? codeElement.textContent : ''
const code = codeElement?.textContent || ''

const result = `<div relative>
const result = `<div class="relative">
<div data-code=${encodeURIComponent(code)} data-index=${index} class="code-copy-btn group">
${copied()[index] === true ? '<i class="i-carbon-checkmark"></i>' : '<i class="i-carbon-copy"></i>'}
</div>
Expand Down

0 comments on commit 694cd9b

Please sign in to comment.