Improve content compatibility messages for structured content matching
Co-authored-by: me <me@kentcdodds.com>
This commit is contained in:
parent
78fd8949df
commit
1756b010d8
1 changed files with 12 additions and 6 deletions
|
|
@ -27,7 +27,7 @@ const checkContentCompatibility = (
|
|||
if (textBlocks.length === 0) {
|
||||
return {
|
||||
isCompatible: false,
|
||||
message: "No text blocks found",
|
||||
message: "No text blocks to match structured content",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ const checkContentCompatibility = (
|
|||
if (isEqual) {
|
||||
return {
|
||||
isCompatible: true,
|
||||
message: `Matching JSON found${textBlocks.length > 1 ? " (multiple blocks)" : ""}${unstructuredContent.length > textBlocks.length ? " + other content" : ""}`,
|
||||
message: `Structured content matches text block${textBlocks.length > 1 ? " (multiple blocks)" : ""}${unstructuredContent.length > textBlocks.length ? " + other content" : ""}`,
|
||||
};
|
||||
}
|
||||
} catch {
|
||||
|
|
@ -57,7 +57,7 @@ const checkContentCompatibility = (
|
|||
|
||||
return {
|
||||
isCompatible: false,
|
||||
message: "No matching JSON found",
|
||||
message: "No text block matches structured content",
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue