mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
lecture parsing
This commit is contained in:
@@ -9,15 +9,14 @@ export function parseLecture(fileContent: string): Lecture {
|
||||
const name = extractLabelValue(settings, "Name");
|
||||
const date = extractLabelValue(settings, "Date");
|
||||
|
||||
const content = fileContent.split("---\n")[1].trim();
|
||||
|
||||
const content = fileContent.split("---\n").slice(1).join("---\n").trim();
|
||||
return {
|
||||
name,
|
||||
date,
|
||||
content,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error("Error parsing lecture", fileContent);
|
||||
console.error("Error parsing lecture: ", fileContent);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user