Adding slightly nicer auto-indentation in xml/html mode#1694
Closed
mtaran-google wants to merge 4 commits intocodemirror:masterfrom
mtaran-google:master
Closed
Adding slightly nicer auto-indentation in xml/html mode#1694mtaran-google wants to merge 4 commits intocodemirror:masterfrom mtaran-google:master
mtaran-google wants to merge 4 commits intocodemirror:masterfrom
mtaran-google:master
Conversation
Member
|
Nice. But why did you split |
Contributor
Author
|
Thanks for the suggestions! I don't program in JS much, so it hadn't occurred to me to use a property like that :) |
marijnh
pushed a commit
that referenced
this pull request
Jul 26, 2013
Member
|
Looks good. Merged. |
anaran
pushed a commit
to anaran/CodeMirror
that referenced
this pull request
Feb 22, 2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are two changes to how html and xml get indented. The first is that attribute names on a new line will get indented to be in a line with the first attribute. For example, if you start out with this
then press enter at the end and type 'style="...">' to get
The option added controls whether to use the new attr name indentation algorithm or the old one, defaulting to the new.
The second change indents multi-line string attr values. For example, if you start with
then press enter at the end and type 'width: 10px">' you'll get
This seems like a generally nicer way of doing things, so I didn't put in an option for disabling it.
Two tests fail with these changes, but I checked and they seem to also be failing at your head. I'm pretty new to working with github, so maybe I didn't check it properly and my change did cause the failures. Hope you can let me know if there are problems! Thanks :)