Skip to content
Snippets Groups Projects
Commit 57c50015 authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Allow for sources to be given anywhere in the first line

parent 1e6ae5be
No related branches found
No related tags found
No related merge requests found
......@@ -74,11 +74,17 @@ while (<>) {
undef $media;
undef %last_option;
undef @options;
} elsif (/^([01])(.*?)(?:\(([^()]*)\))?$/) {
} elsif (/^([01])(.*?)$/) {
$single_choice = $1;
$question = $2;
chomp $question;
if ($question =~ /\(([^()]*)\)/) {
$source = $1;
$question =~ s/\Q($source)\E//;
chomp $source;
}
} elsif (/^[|](.+)/) {
if ($last_option{"option"}) {
$last_option{"option"} .= $1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment