Skip to content

Commit 1eec262

Browse files
committed
Added clean up to exercise type string, closes #48
1 parent 3c22675 commit 1eec262

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# [Changelog v0.2.0 &nbsp; <img src="https://img.shields.io/badge/Latest-0a7fa6">](https://github.com/digas99/duo-explained/releases/tag/v0.2.0)
1+
# [Changelog v0.2.1 &nbsp; <img src="https://img.shields.io/badge/Latest-0a7fa6">](https://github.com/digas99/duo-explained/releases/tag/v0.2.0)
2+
3+
### Bug Fixes
4+
- Added clean up to exercise type string to fix [#48](https://github.com/digas99/duo-explained/issues/48)
5+
6+
# [Changelog v0.2.0 &nbsp; <img src="https://img.shields.io/badge/Released-11ad2">](https://github.com/digas99/duo-explained/releases/tag/v0.2.0)
27

38
### New Features
49
- Added Extension UI language selection

platform/chromium/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Duo Explained",
33
"description": "Get explanations for exercises on Duolingo using OpenAI's ChatGPT.",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"manifest_version": 3,
66
"icons": {
77
"16": "/images/logo/logo_16x16.png",

platform/firefox/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Duo Explained",
33
"description": "Get explanations for exercises on Duolingo using OpenAI's ChatGPT.",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"manifest_version": 3,
66
"icons": {
77
"16": "/images/logo/logo_16x16.png",

scripts/content/lesson/parser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ class ChallengeParser {
1212
const exerciseHeader = wrapper.querySelector("h1[data-test='challenge-header']");
1313
const exercise = exerciseHeader?.innerText;
1414

15+
// clean up the exercise type
16+
const exerciseType = type.split(" ")[0];
17+
1518
let content, language;
16-
switch(type) {
19+
switch(exerciseType) {
1720
case "syllableTap":
1821
case "translate":
1922
content = this.parseTranslate(wrapper);

0 commit comments

Comments
 (0)