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

Range formatting inserts <null> when formatting inside DOCTYPE element #764

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

angelozerr
Copy link
Contributor

Range formatting inserts when formatting inside DOCTYPE element

Fixes #682

Signed-off-by: azerr [email protected]

@angelozerr angelozerr force-pushed the dtd-entity-range-format branch from 605bd0a to 19539c4 Compare June 5, 2020 12:54
@angelozerr angelozerr marked this pull request as ready for review June 5, 2020 12:54
@angelozerr angelozerr force-pushed the dtd-entity-range-format branch from 19539c4 to fdd7b59 Compare June 5, 2020 14:03
@xorye
Copy link

xorye commented Jun 5, 2020

When range formatting, the correct indentation is not being applied:
ex

This code:
https://github.com/eclipse/lemminx/blob/5082892530a27f4a101035c436b318ea905628a5/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/services/XMLFormatter.java#L94

is overwriting the indent level set in:

if (withinDTDContent) {
		this.indentLevel = 1;
		uri += ".dtd";
}

@angelozerr angelozerr force-pushed the dtd-entity-range-format branch from fdd7b59 to f711b24 Compare June 5, 2020 17:00
@angelozerr
Copy link
Contributor Author

angelozerr commented Jun 5, 2020

@xorye my bad I pushed bad commit, I fixed all reported issues.

@xorye
Copy link

xorye commented Jun 8, 2020

Awesome. This PR looks great.

@xorye xorye merged commit 3ffb1ff into eclipse-lemminx:master Jun 8, 2020
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.

Range formatting inserts <null> when formatting inside DOCTYPE element
2 participants