Skip to content

SVG extraction failes on icons containing a comment at the top (f.e. bash-plain.svg) #444

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

Closed
amacado opened this issue Jan 3, 2021 · 8 comments · Fixed by #455
Closed
Assignees
Labels
bug Use this label for pointing out bugs

Comments

@amacado
Copy link
Member

amacado commented Jan 3, 2021

EDIT: See #444 (comment) for explaination

There is a problem with displaying the plain version of the new bash icon. It shows up but not displaying the svg code below:
It works fine for the original version and also for the font versions. I wonder if this might be a result of the updated build process (removing color function or so? It's just a guess).

image

Interesting fact: When you open the svg in the browser it will show repeated:
https://raw.githubusercontent.com/devicons/devicon/master/icons/bash/bash-plain.svg
image

@amacado amacado added the bug Use this label for pointing out bugs label Jan 3, 2021
@Thomas-Boi
Copy link
Member

Hmm that's strange. The Icomoon color removal only applies to the font. The original SVG is not affected in anyway.

@amacado
Copy link
Member Author

amacado commented Jan 3, 2021

This was just a guess on my side, it is probably another reason..

@EnisMulic
Copy link
Contributor

@amacado I just checked and it looks like there was some extra svg elements in the original file I took, removing that seems to fix the issue
https://raw.githubusercontent.com/EnisMulic/devicon/fix/icon/bash/icons/bash/bash-plain.svg
image

@Thomas-Boi
Copy link
Member

@EnisMulic I was wondering about that too. It seems that the plain version somehow has more content than the original.

Can you create a new PR that contain this fix please?

@amacado
Copy link
Member Author

amacado commented Jan 4, 2021

The error is still there. I will investigate further. Think it's related to the way we extract the svg to show the code.

@amacado
Copy link
Member Author

amacado commented Jan 4, 2021

Yep, the error is related to the way we extract the information from the svg. When there is a comment block at the beginning of the svg we fail in showing the correct code. Some examples:

image
image
image

I will rename the issue and setup a fix for this.

@amacado amacado changed the title Invalid content in bash-plain.svg SVG extraction failes on icons containing a comment at the top (f.e. bash-plain.svg) Jan 4, 2021
@amacado amacado linked a pull request Jan 4, 2021 that will close this issue
@Thomas-Boi
Copy link
Member

Wow, that's an interesting bug. I have merge your fix into develop. Let's hope that this will be the last time we see this issue.

@amacado amacado mentioned this issue Jan 4, 2021
@amacado
Copy link
Member Author

amacado commented Jan 4, 2021

@amacado amacado closed this as completed Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Use this label for pointing out bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants