Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix/image link #322

Closed
wants to merge 2 commits into from
Closed

[WIP] Fix/image link #322

wants to merge 2 commits into from

Conversation

ryan-berger
Copy link
Collaborator

Fixes #312

@codecov-commenter
Copy link

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
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

Copy link
Contributor

@andy1xx8 andy1xx8 left a comment

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
Copy link
Collaborator

erickok commented Jan 18, 2021

Alternative fix: #499 499

@ryan-berger
Copy link
Collaborator 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