Skip to content

Commit

Permalink
feat: Now parses already rated submission from Uni2Work (still discar…
Browse files Browse the repository at this point in the history
…ds the subratings and comments)
  • Loading branch information
michaelkoelle committed Feb 20, 2021
1 parent 31ecd2a commit c1a816f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/parser/Uni2WorkParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export default class Uni2WorkParser implements Parser {
public configFilePattern = /bewertung_([a-z0-9]{16})\.txt/g;

public deserialize(text: string): Correction {
const u2wDoc = YAML.parseDocument(text);
const [configText, ...rest] = text.split('...');
const u2wDoc = YAML.parseDocument(configText);

if (u2wDoc.errors.length > 0) {
throw new Error(`Could not parse the rating file!`);
Expand Down

0 comments on commit c1a816f

Please sign in to comment.