Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Correct indentation of html snippet to match auto indent #151

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

caleb531
Copy link

Description of the Change

This PR deals with this package's html snippet (the one that expands to a basic HTML document). I noticed that the way the head and body tags are indented is inconsistent with how Atom auto-indents the code when you run the Editor: Auto Indent command. This PR reduces the indentation of the html snippet to match what auto-indent would do.

Expanded contents of html snippet:
screen shot 2017-01-17 at 10 26 49 am

Contents after auto-indent (and the proposed snippet contents):
screen shot 2017-01-17 at 10 27 23 am

I don't think any additional tests are needed for a simple change in snippet indentation.

Alternate Designs

You could look at fixing this inconsistency from the opposite angle—changing the auto indent behavior to reflect the current indentation for this snippet. However, that approach seems to me a bit overkill, and I'd much prefer the flatter nesting of the auto indent.

Benefits

  • Consistency with the current behavior of auto-indent

Possible Drawbacks

No practical drawbacks, really.

Applicable Issues

None, and all tests are still passing!

This makes the indentation of the `html` snippet consistent with how
Atom auto-indents its expanded contents when the 'Auto Indent' command
is run.
@50Wliu
Copy link
Contributor

50Wliu commented Jan 17, 2017

Personally, I like the "before" style. Of course, this is subjective. I'll let this sit for a while and see what others think about it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants