[WIP] Fix/image link#322
Conversation
Codecov Report
@@ Coverage Diff @@
## master #322 +/- ##
==========================================
- Coverage 81.04% 80.00% -1.05%
==========================================
Files 8 8
Lines 902 915 +13
==========================================
+ Hits 731 732 +1
- Misses 171 183 +12
Continue to review full report at Codecov.
|
| @@ -32,10 +35,38 @@ InteractableElement parseInteractableElement( | |||
| switch (element.localName) { | |||
| case "a": | |||
| interactableElement.href = element.attributes['href']; | |||
There was a problem hiding this comment.
Too many abstraction levels in the body of 1 method.
You should break it down to smaller method/func
Infact, the code should do like this ( i will assume that your code logic is correct)
if(hasNoChild(interactableElement)) {
underline(interactableElement);
} else {
underlineChildTextElements(interactableElement);
}
Then, the method underlineChildTextElements will take care the recurrsive search & apply the corresponding style to its children
andy1xx8
left a comment
There was a problem hiding this comment.
Too many abstraction levels in the body of 1 method.
You should break it down to smaller method/func
Infact, the code should do like this ( i will assume that your code logic is correct)
if(hasNoChild(interactableElement)) {
underline(interactableElement);
} else {
underlineChildTextElements(interactableElement);
}
Then, the method underlineChildTextElements will take care the recurrsive search & apply the corresponding style to its children
|
Alternative fix: #499 499 |
|
Closing due to #499 |
Fixes #312