tanakh / cargo-atcoder

Cargo subcommand for AtCoder
BSD 3-Clause "New" or "Revised" License
397 stars 36 forks source link

Avoid panic while searching for a choice "rust". #24

Closed tatsuya0619 closed 4 years ago

tatsuya0619 commented 4 years ago

cargo-atcoder assumes that the format of language choices is like

<option value="4005" data-mime="text/x-java">Java (OpenJDK 11.0.6)</option>
<option value="4006" data-mime="text/x-python">Python (3.8.2)</option>
<option value="4007" data-mime="text/x-sh">Bash (5.0.11)</option>

However at this time, A option element whose text is empty is selected too as language choices. And the current implementation panics if it tries to parse empty option. This PR avoid that.

tanakh commented 4 years ago

Thank you for quick fixing!