algolia / algolia/diffable-html

svg attributes

Open
#54 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
38
Forks
8
PR merge metrics
No merged PRs in 30d

Description

format incorrectly changes camelcase attributes from SVG elements (and likely MathML etc.) to lowercase, e.g. `viewBox` becomes `viewbox`.

Replication:

```
import format from 'diffable-html'

console.log(format(''))
```

This is probably not an issue for comparing snapshots, but if you actually want the output of format to be correct, it's kind of important.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reproduction in the issue and trace the formatter's handling of SVG attributes. Check how camelCase names such as viewBox are normalized, including whether the same behavior affects MathML. Done means formatted SVG preserves the correct attribute casing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.