File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export async function showPanel(
166
166
if ( e . uri . toString ( ) === activeEditor ?. uri ) {
167
167
const message = Messages . AssessmentAnswer (
168
168
activeEditor . questionId ,
169
- activeEditor . code ? activeEditor . code . split ( "\n" ) . slice ( activeEditor . num_prepend_lines ) . join ( "\n" ) : ""
169
+ activeEditor . getActualCode ( )
170
170
) ;
171
171
172
172
sendToFrontend ( panel , message ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ export class Editor {
39
39
return this . editor ?. document . getText ( ) ;
40
40
}
41
41
42
+ getActualCode ( ) : string {
43
+ return this . code ? this . code . split ( "\n" ) . slice ( this . num_prepend_lines ) . join ( "\n" ) : ""
44
+ }
45
+
42
46
// TODO: This method is too loaded, it's not obvious it also shows the editor
43
47
static async create (
44
48
workspaceLocation : VscWorkspaceLocation ,
You can’t perform that action at this time.
0 commit comments