Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4e83dd1

Browse files
committed
Do not filter html tags after downloading problem
1 parent fc86601 commit 4e83dd1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/plugins/leetcode.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ plugin.getProblem = function(problem, cb) {
158158
problem.totalAC = JSON.parse(q.stats).totalAccepted;
159159
problem.totalSubmit = JSON.parse(q.stats).totalSubmission;
160160

161-
let content = q.translatedContent ? q.translatedContent : q.content;
162-
// Replace <sup/> with '^' as the power operator
163-
content = content.replace(/<\/sup>/gm, '').replace(/<sup>/gm, '^');
164-
problem.desc = he.decode(cheerio.load(content).root().text());
161+
const content = q.translatedContent ? q.translatedContent : q.content;
162+
// // Replace <sup/> with '^' as the power operator
163+
// content = content.replace(/<\/sup>/gm, '').replace(/<sup>/gm, '^');
164+
// problem.desc = he.decode(cheerio.load(content).root().text());
165+
problem.desc = content;
165166

166167
problem.templates = JSON.parse(q.codeDefinition);
167168
problem.testcase = q.sampleTestCase;

0 commit comments

Comments
 (0)