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

Duplicate attribute names change order when written to HTML #349

Open
cpsievert opened this issue Nov 1, 2022 · 2 comments
Open

Duplicate attribute names change order when written to HTML #349

cpsievert opened this issue Nov 1, 2022 · 2 comments

Comments

@cpsievert
Copy link
Collaborator

For example

> div(id = "foo", class = "bar", class = "baz")
<div class="bar baz" id="foo"></div>
> tagAppendAttributes(div(id = "foo", class = "bar"), class = "baz")
<div class="bar baz" id="foo"></div>

This is a result of

uniqueAttribNames <- sort(unique(attribNames))

(and maybe we just remove the sort()?)

@cpsievert cpsievert changed the title Duplicate attribute names get sorted when written to HTML Duplicate attribute names change order when written to HTML Nov 1, 2022
@cpsievert
Copy link
Collaborator Author

FWIW, this behavior appears to go back to at least v0.4.0

@wch
Copy link
Collaborator

wch commented Nov 1, 2022

Looks like the sorting was added in #282.

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

No branches or pull requests

2 participants