From e0de8b4dcfb16a325d90ff94b3e60054f5378697 Mon Sep 17 00:00:00 2001
From: Thilo Wischmeyer <thwischm@gmail.com>
Date: Tue, 31 Aug 2021 16:20:51 +0200
Subject: [PATCH] Pass every line to mathjax individually

---
 .../submission_notes/SubmissionCorrection.vue    | 16 ++++++++--------
 .../src/pages/student/StudentSubmissionPage.vue  | 14 +++++++-------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/frontend/src/components/submission_notes/SubmissionCorrection.vue b/frontend/src/components/submission_notes/SubmissionCorrection.vue
index d63cff8e..d3c9e736 100644
--- a/frontend/src/components/submission_notes/SubmissionCorrection.vue
+++ b/frontend/src/components/submission_notes/SubmissionCorrection.vue
@@ -18,12 +18,12 @@
         id="sub-lines"
         #table-content
       >
-        <math-renderer :enabled="mathIsRendered">
-          <tr
-            v-for="(code, lineNo) in submission"
-            :id="`sub-line-${lineNo}`"
-            :key="`${submissionObj.pk}${lineNo}`"
-          >
+        <tr
+          v-for="(code, lineNo) in submission"
+          :id="`sub-line-${lineNo}`"
+          :key="`${submissionObj.pk}${lineNo}`"
+        >
+          <math-renderer :enabled="mathIsRendered">
             <submission-line
               :hint="hasHiddenComment(lineNo)"
               :code="code"
@@ -57,8 +57,8 @@
                 @collapseFeedbackForm="toggleEditorOnLine(lineNo)"
               />
             </submission-line>
-          </tr>
-        </math-renderer>
+          </math-renderer>
+        </tr>
       </template>
       <template #labels>
         <label-selector
diff --git a/frontend/src/pages/student/StudentSubmissionPage.vue b/frontend/src/pages/student/StudentSubmissionPage.vue
index 755983c6..fb800b4c 100644
--- a/frontend/src/pages/student/StudentSubmissionPage.vue
+++ b/frontend/src/pages/student/StudentSubmissionPage.vue
@@ -30,11 +30,11 @@
             />
           </template>
           <template #table-content>
-            <math-renderer :enabled="mathIsRendered">
-              <tr
-                v-for="(code, lineNo) in submissionText"
-                :key="lineNo"
-              >
+            <tr
+              v-for="(code, lineNo) in submissionText"
+              :key="lineNo"
+            >
+              <math-renderer :enabled="mathIsRendered">
                 <submission-line
                   :code="code"
                   :line-no="lineNo"
@@ -52,8 +52,8 @@
                     </template>
                   </template>
                 </submission-line>
-              </tr>
-            </math-renderer>
+              </math-renderer>
+            </tr>
           </template>
         </base-annotated-submission>
         <v-card>
-- 
GitLab