Skip to content

[WIP] Fix/image link#322

Closed
ryan-berger wants to merge 2 commits into
masterfrom
fix/image-link
Closed

[WIP] Fix/image link#322
ryan-berger wants to merge 2 commits into
masterfrom
fix/image-link

Conversation

@ryan-berger

Copy link
Copy Markdown
Contributor

Fixes #312

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #322 into master will decrease coverage by 1.04%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
lib/src/interactable_element.dart 50.00% <14.28%> (-50.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a8e58b...d4b3958. Read the comment docs.

@@ -32,10 +35,38 @@ InteractableElement parseInteractableElement(
switch (element.localName) {
case "a":
interactableElement.href = element.attributes['href'];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 andy1xx8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@erickok

erickok commented Jan 18, 2021

Copy link
Copy Markdown
Contributor

Alternative fix: #499 499

@ryan-berger

Copy link
Copy Markdown
Contributor Author

Closing due to #499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove underline from image link?

4 participants