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

Beautifier does not re-indent E4X/JSX literals #665

Open
bitwiseman opened this issue Apr 8, 2015 · 3 comments
Open

Beautifier does not re-indent E4X/JSX literals #665

bitwiseman opened this issue Apr 8, 2015 · 3 comments

Comments

@bitwiseman
Copy link
Member

// This remains badly indented
var a = <x>
<note>everything {inside} the xml tags is treated as a literal string. /sadface</note>
</x>
@bitwiseman
Copy link
Member Author

@zebzhao
This is not the place to advertise your project, sorry.
If you'd like to contribute code to fix this issue in this project, we'd welcome the help.

@bitwiseman bitwiseman added this to the v1.8.x milestone Oct 17, 2018
@bitwiseman
Copy link
Member Author

bitwiseman commented Oct 18, 2018 via email

@bitwiseman bitwiseman modified the milestones: v1.9.x, v1.10.x Apr 29, 2019
@bitwiseman bitwiseman modified the milestones: v1.10.x, v1.10.xx Jan 14, 2020
@bitwiseman bitwiseman modified the milestones: v1.10.x, v1.11.x Apr 5, 2020
@bitwiseman bitwiseman modified the milestones: v1.11.x, v1.12.x Aug 13, 2020
@bitwiseman bitwiseman modified the milestones: v1.12.x, 1.13.x Aug 20, 2020
@bitwiseman bitwiseman mentioned this issue Dec 23, 2020
6 tasks
@bitwiseman
Copy link
Member Author

bitwiseman commented Dec 23, 2020

It might be possible to look at the incoming code to try to detect what the indenting was and then use that to replace the leading whitespace for each line in the xml. Or even some simplistic forcing of indents (though that would result in other kinds of inaccuracy).

Long term the right thing would be to extract xml and/or react beautifiers from the html beautifier and have the javascript beautifier call out to that when it encounters an xml block inside js.

@bitwiseman bitwiseman modified the milestones: v1.13.1, v1.13.x Jan 8, 2021
@bitwiseman bitwiseman modified the milestones: v1.13.6, v1.13.x Jan 26, 2021
@bitwiseman bitwiseman modified the milestones: v1.13.7, v1.13.x Apr 13, 2021
@bitwiseman bitwiseman modified the milestones: v1.14.1, v1.14.x Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant