EgorKulikov / idea-chelper

Automatically exported from code.google.com/p/idea-chelper
112 stars 59 forks source link

CodeForces parser no longer works #52

Closed jmerle closed 6 years ago

jmerle commented 6 years ago

Due to CodeForces adding a copy button to their example test cases, the parser does no longer work properly (it parses the problem correctly, but messes up the test data). Credits go to @khokharnikunj8 for reporting it in one of my repositories.

blue-atom commented 6 years ago

@jmerle @AlexeyDmitriev @EgorKulikov It is not working because now in codeforces inside \<div> element (for both sample input and output), there are one further nested \<div class="title" > and \<pre> but code in, CodeforcesParser.java (in parseTaskFromHTML method ) only expects \<pre> element. so some statments to ignore that extra \<div> element should be added. And also \<pre> element will have diffrent "id" attribute each time so some regular expression must be used.

I am willing to work on this issue and I am studying StringParser.java. I guess i can fix this issue

blue-atom commented 6 years ago

@jmerle @AlexeyDmitriev @EgorKulikov I just found that @petrmitrichev have already fixed the issue with codeforces and it should work fine but his commit is not merged so far (edit: it is now part of the main branch ).... his commit

So this problem is fixed for now but I think in future in other sites also this problem may arise so, I am thinking to add regex parserer..i am working on it.....

blue-atom commented 6 years ago

You can use "chelper companion" ( link ) instead of "chelper extension"....it is maintained by @jmerle