|
@@ -56,7 +56,6 @@ angular.module('app')
|
56
|
56
|
var questions = input.split("\\section");
|
57
|
57
|
questions.splice(0, 1);
|
58
|
58
|
|
59
|
|
- var firstQuestion = null;
|
60
|
59
|
questions.forEach(function(questionStr)
|
61
|
60
|
{
|
62
|
61
|
var question = {
|
|
@@ -65,13 +64,9 @@ angular.module('app')
|
65
|
64
|
};
|
66
|
65
|
var responses = questionStr.split("\\item");
|
67
|
66
|
question.Text = $scope.formatText(responses[0]);
|
68
|
|
- question.Text = question.Text.replace(/^\*\{[^\}]* ([0-9]+)[^\}]*\}/, function($1, $2)
|
|
67
|
+ question.Text = question.Text.replace(/^\*\{([^\}]*)\}/, function($1, $2)
|
69
|
68
|
{
|
70
|
|
- $2 = parseInt($2);
|
71
|
|
- if (firstQuestion == null) {
|
72
|
|
- firstQuestion = $2;
|
73
|
|
- }
|
74
|
|
- return "Question " + ($2 - firstQuestion + 1) + "\n";
|
|
69
|
+ return $2 + "\n";
|
75
|
70
|
});
|
76
|
71
|
responses.splice(0, 1);
|
77
|
72
|
|