Prevent html formatting when closing tag is on same line as opening tag
up vote
0
down vote
favorite
If I have code on one line e.g.
{ Something(); }
formatting will leave the block on one line. And only if there's some line break present will it format it. E.g. if there is
{
Something(); }
will it format it nicely into:
{
Something();
}
I want the same rule for html:
I.e. If I have
<div>something
</div>
I do want it to format it to
<div>
something
</div>
But if I take care to put it on one line up until and including the closing tag
<div>something</div>
I would like it to stay that way.
Is there a way to achieve that?
html visual-studio
add a comment |
up vote
0
down vote
favorite
If I have code on one line e.g.
{ Something(); }
formatting will leave the block on one line. And only if there's some line break present will it format it. E.g. if there is
{
Something(); }
will it format it nicely into:
{
Something();
}
I want the same rule for html:
I.e. If I have
<div>something
</div>
I do want it to format it to
<div>
something
</div>
But if I take care to put it on one line up until and including the closing tag
<div>something</div>
I would like it to stay that way.
Is there a way to achieve that?
html visual-studio
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
If I have code on one line e.g.
{ Something(); }
formatting will leave the block on one line. And only if there's some line break present will it format it. E.g. if there is
{
Something(); }
will it format it nicely into:
{
Something();
}
I want the same rule for html:
I.e. If I have
<div>something
</div>
I do want it to format it to
<div>
something
</div>
But if I take care to put it on one line up until and including the closing tag
<div>something</div>
I would like it to stay that way.
Is there a way to achieve that?
html visual-studio
If I have code on one line e.g.
{ Something(); }
formatting will leave the block on one line. And only if there's some line break present will it format it. E.g. if there is
{
Something(); }
will it format it nicely into:
{
Something();
}
I want the same rule for html:
I.e. If I have
<div>something
</div>
I do want it to format it to
<div>
something
</div>
But if I take care to put it on one line up until and including the closing tag
<div>something</div>
I would like it to stay that way.
Is there a way to achieve that?
html visual-studio
html visual-studio
edited Nov 11 at 21:03
asked Nov 11 at 20:42
ispiro
12.8k1979178
12.8k1979178
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53253034%2fprevent-html-formatting-when-closing-tag-is-on-same-line-as-opening-tag%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown