Skip to content

Commit

Permalink
fix parsing source value
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed May 13, 2024
1 parent 999446c commit 9a9d33a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fifty-hotels-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mdxts": patch
---

Fixes using the initial value rather than the possibly transformed value in `CodeBlock`.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export async function parseSourceTextMetadata({
.replace(/\d+\./, '') // Remove ordered number prefix

return {
value: finalValue,
value: sourceFile ? sourceFile.getFullText() : finalValue,
language: finalLanguage,
isJsxOnly: jsxOnly,
sourceFile,
Expand Down

0 comments on commit 9a9d33a

Please sign in to comment.