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

[SVG file] Replace attribute delimiters “ and ” with ASCII " #2781

Merged
merged 1 commit into from
Jul 27, 2022
Merged

[SVG file] Replace attribute delimiters “ and ” with ASCII " #2781

merged 1 commit into from
Jul 27, 2022

Conversation

habere-et-dispertire
Copy link
Contributor

It was svgo that warned me about this file:

$ svgo --config svgo-config.js --input features-oop.svg --output test.svg
SvgoParserError: features-oop.svg:1:12: Unquoted attribute value

> 1 | <svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=“http://www.w3…
    |            ^
  2 | <path fill-rule=“evenodd” clip-rule=“evenodd” d=“M8.99805 40.5C11.8975 40.5 14.2…
  3 | <path d=“M16.498 46.5C15.0208 43.7302 12.1372 42 8.99805 42C5.8589 42 2.97529 43…

But I see my editor's gutter was too via xmllint:

$ xmllint features-oop.svg 
features-oop.svg:1: parser error : AttValue: " or ' expected
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : attributes construct error
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : Couldn't find end of Start Tag svg line 1
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : Extra content at the end of the document
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^

Are we doing any consistency checks with SVG files?

It was `svgo` that warned me about this file:

~~~bash
$ svgo --config svgo-config.js --input features-oop.svg --output test.svg
SvgoParserError: features-oop.svg:1:12: Unquoted attribute value

> 1 | <svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=“http://www.w3…
    |            ^
  2 | <path fill-rule=“evenodd” clip-rule=“evenodd” d=“M8.99805 40.5C11.8975 40.5 14.2…
  3 | <path d=“M16.498 46.5C15.0208 43.7302 12.1372 42 8.99805 42C5.8589 42 2.97529 43…
~~~

But I see my editor's gutter was too via `xmllint`:

~~~
$ xmllint features-oop.svg 
features-oop.svg:1: parser error : AttValue: " or ' expected
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : attributes construct error
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : Couldn't find end of Start Tag svg line 1
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
features-oop.svg:1: parser error : Extra content at the end of the document
<svg width=“48” height=“48" viewBox=“0 0 48 48” fill=“none” xmlns=
           ^
~~~

Are we doing any consistency checks with SVG files?
@habere-et-dispertire habere-et-dispertire changed the title Replace attribute value delimiters “ and ” with ASCII " [SVG file] Replace attribute delimiters “ and ” with ASCII " Jul 22, 2022
@iHiD iHiD requested a review from ErikSchierboom July 26, 2022 23:15
@iHiD
Copy link
Member

iHiD commented Jul 26, 2022

@habere-et-dispertire Thanks :)
@ErikSchierboom Can you check this and merge as appropriate please.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

LGTM

@ErikSchierboom ErikSchierboom merged commit 7191799 into exercism:main Jul 27, 2022
@habere-et-dispertire habere-et-dispertire deleted the patch-1 branch July 30, 2022 01:00
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.

3 participants