File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ plugin.getProblem = function(problem, cb) {
137137 ' sampleTestCase' ,
138138 ' enableRunCode' ,
139139 ' metaData' ,
140+ ' translatedContent' ,
140141 ' discussCategoryId' ,
141142 ' }' ,
142143 '}'
@@ -156,7 +157,11 @@ plugin.getProblem = function(problem, cb) {
156157
157158 problem . totalAC = JSON . parse ( q . stats ) . totalAccepted ;
158159 problem . totalSubmit = JSON . parse ( q . stats ) . totalSubmission ;
159- problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
160+ if ( ! q . translatedContent ) {
161+ problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
162+ } else {
163+ problem . desc = he . decode ( cheerio . load ( q . translatedContent ) . root ( ) . text ( ) ) ;
164+ }
160165 problem . templates = JSON . parse ( q . codeDefinition ) ;
161166 problem . testcase = q . sampleTestCase ;
162167 problem . testable = q . enableRunCode ;
You can’t perform that action at this time.
0 commit comments