mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-27 07:58:31 -06:00
added catches around markdown to html, might throw exception if image error
This commit is contained in:
@@ -104,15 +104,22 @@ export const getStatus = ({
|
||||
),
|
||||
};
|
||||
|
||||
const htmlIsSame = htmlIsCloseEnough(
|
||||
markdownToHTMLSafe(assignment.description, settings),
|
||||
canvasAssignment.description
|
||||
);
|
||||
if (!htmlIsSame)
|
||||
try {
|
||||
const htmlIsSame = htmlIsCloseEnough(
|
||||
markdownToHTMLSafe(assignment.description, settings),
|
||||
canvasAssignment.description
|
||||
);
|
||||
if (!htmlIsSame)
|
||||
return {
|
||||
status: "incomplete",
|
||||
message: "Canvas description is different",
|
||||
};
|
||||
} catch (exception) {
|
||||
return {
|
||||
status: "incomplete",
|
||||
message: "Canvas description is different",
|
||||
message: "Error parsing markdown " + exception,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return { status: "published", message: "" };
|
||||
|
||||
Reference in New Issue
Block a user