Skip to content

Commit

Permalink
use raw text to normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
tcm390 committed Feb 5, 2025
1 parent 304768f commit eb15c6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function parseJSONObjectFromText(
const jsonBlockMatch = text.match(jsonBlockPattern);

if (jsonBlockMatch) {
const parsingText = normalizeJsonString(jsonBlockMatch[1]);
const parsingText = normalizeJsonString(text);
try {
jsonData = JSON.parse(parsingText);
} catch (e) {
Expand All @@ -159,7 +159,7 @@ export function parseJSONObjectFromText(
const objectMatch = text.match(objectPattern);

if (objectMatch) {
const parsingText = normalizeJsonString(objectMatch[0]);
const parsingText = normalizeJsonString(text);
try {
jsonData = JSON.parse(parsingText);
} catch (e) {
Expand Down

0 comments on commit eb15c6e

Please sign in to comment.