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

VSCode doesn't seem to override html.format.extraLiners config prop #20977

Closed
mlewand opened this issue Feb 21, 2017 · 2 comments
Closed

VSCode doesn't seem to override html.format.extraLiners config prop #20977

mlewand opened this issue Feb 21, 2017 · 2 comments
Assignees

Comments

@mlewand
Copy link
Contributor

mlewand commented Feb 21, 2017

I couldn't reopen #4261, so here it is as a new issue:

It looks like there's a regression, as if VSCode would no longer respect html.format.extraLiners config.

  • VSCode Version: Code 1.9.1 (f9d0c68, 2017-02-09T00:26:45.394Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:
Extension Author Version
html-snippets abusaidm 0.1.0
jslint ajhyndman 1.2.1
Bookmarks alefragnani 0.11.0
ck4-test-mate mlewand 0.0.1
jsrefactor cmstead 0.5.3
jshint dbaeumer 0.10.15
vscode-eslint dbaeumer 1.2.6
copy-relative-path enochc 0.1.1
beautify HookyQR 0.8.4
copy-markdown-as-html jerriepelser 1.0.0
docthis joelday 0.4.0
copy-github-url mattlott 0.1.0
vscode-exec-node miramac 0.2.1
ecdc mitchdenny 0.10.3
select-part-of-word mlewand 0.2.0
debugger-for-chrome msjsdiag 2.5.3
promise-snippets progre 0.2.3
vscode-open sandcastle 0.1.0
code-settings-sync Shan 2.4.4
code-spell-checker streetsidesoftware 0.14.6
selectline-statusbar tomoki1207 0.0.1
vscode-react-native vsmobile 0.3.1
change-case wmaurer 1.0.0
JasmineSnippets xabikos 0.2.1
JavaScriptSnippets xabikos 1.4.0

Steps to Reproduce:

  1. Set your "html.format.extraLiners" to "head,body,div,p,/html".
  2. Open new tab with ctrl+n.
  3. Switch tab language to HTML.
  4. Set a following markup:
    <!DOCTYPE html>
    <html lang="en">
    	<head>
    		<title></title>
    		<meta charset="UTF-8">
    		<meta name="viewport" content="width=device-width, initial-scale=1">
    		<link href="css/style.css" rel="stylesheet">
    	</head>
    	<body>
    		<div>foo</div>
    		<div>foo</div>
    		<div>foo</div>
    		<p>foo</p>
    		<p>foo</p>
    		<p>foo</p>
    	</body>
    </html>
  5. Press ctrl+shift+f to execute Format Document command.

Expected

Lines are inserted also after p and div elements.

<!DOCTYPE html>
<html lang="en">

	<head>
		<title></title>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="css/style.css" rel="stylesheet">
	</head>

	<body>
		<div>foo</div>

		<div>foo</div>

		<div>foo</div>

		<p>foo</p>

		<p>foo</p>

		<p>foo</p>

		</body>

</html>

Actual

Missing new lines after div or p.

<!DOCTYPE html>
<html lang="en">

	<head>
		<title></title>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="css/style.css" rel="stylesheet">
	</head>

	<body>
		<div>foo</div>
		<div>foo</div>
		<div>foo</div>
		<p>foo</p>
		<p>foo</p>
		<p>foo</p>
	</body>

</html>
@aeschli
Copy link
Contributor

aeschli commented Feb 21, 2017

It looks like you have extensions installed that does the formatting: https://github.com/HookyQR/VSCodeBeautify.

Please file the issue there.

@aeschli aeschli closed this as completed Feb 21, 2017
@mlewand
Copy link
Contributor Author

mlewand commented Feb 21, 2017

Oh that's embarrassing, I forgot I even installed it. 😆 Thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants