-
Notifications
You must be signed in to change notification settings - Fork 181
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
Beautify on HTML does not work well #78
Comments
Why does it break into a newline after a for attribute. |
Please provide a code snippet so I can test at this end. |
I'm not sure if this is the same issue, or if it even belongs in this repo, but I'm having a similar issue when formatting HTML. When setting In the example below, you can see how the Original<!DOCTYPE html>
<html ng-app="MyBelovedApp" ng-strict-di="true">
<head>
<!-- build:base -->
<base href="/src/app/" />
<!-- endbuild -->
<title>My Beloved App</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<!-- build:icon -->
<link rel="shortcut icon" href="../assets/favicon64.png" />
<!-- endbuild -->
<link href='https://fonts.googleapis.com/css?family=Inconsolata|Open+Sans:300,400' rel='stylesheet' type='text/css' />
<!-- build:css -->
<link rel="stylesheet" href="core/styles.css" />
<!-- endbuild -->
<!-- Google Analytics -->
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
};
ga.l = +new Date;
ga('create', 'UA-76399650-1', 'auto');
</script>
<script src='https://www.google-analytics.com/analytics.js' async></script>
<!-- End Google Analytics -->
</head>
<body layout> Expected<!DOCTYPE html>
<html ng-app="MyBelovedApp"
ng-strict-di="true">
<head>
<!-- build:base -->
<base href="/src/app/" />
<!-- endbuild -->
<title>My Beloved App</title>
<meta http-equiv="X-UA-Compatible"
content="IE=edge" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<!-- build:icon -->
<link rel="shortcut icon"
href="../assets/favicon64.png" />
<!-- endbuild -->
<link href='https://fonts.googleapis.com/css?family=Inconsolata|Open+Sans:300,400'
rel='stylesheet'
type='text/css' />
<!-- build:css -->
<link rel="stylesheet"
href="core/styles.css" />
<!-- endbuild -->
<!-- Google Analytics -->
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
};
ga.l = +new Date;
ga('create', 'UA-76399650-1', 'auto');
</script>
<script src='https://www.google-analytics.com/analytics.js'
async></script>
<!-- End Google Analytics -->
</head>
<body layout> Actual<!DOCTYPE html>
<html ng-app="MyBelovedApp"
ng-strict-di="true">
<head>
<!-- build:base -->
<base href="/src/app/" />
<!-- endbuild -->
<title>My Beloved App</title>
<meta http-equiv="X-UA-Compatible"
content="IE=edge" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<!-- build:icon -->
<link rel="shortcut icon"
href="../assets/favicon64.png" />
<!-- endbuild -->
<link href='https://fonts.googleapis.com/css?family=Inconsolata|Open+Sans:300,400'
rel='stylesheet'
type='text/css' />
<!-- build:css -->
<link rel="stylesheet"
href="core/styles.css" />
<!-- endbuild -->
<!-- Google Analytics -->
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
};
ga.l = +new Date;
ga('create', 'UA-76399650-1', 'auto');
</script>
<script src='https://www.google-analytics.com/analytics.js'
async></script>
<!-- End Google Analytics -->
</head>
<body layout>
|
@schmuli, your's js-beautify issue. It seems that if attribute wrapping is done at all, the indent doesn't come back to where it should. You'll need to log it on the js-beautify repo: https://github.com/beautify-web/js-beautify. @Anbe93, your's is probably related too, but I don't know why it's always wrapping on the |
I've logged an issue for you: beautifier/js-beautify#1103 |
New version released with the js-beautify fix manually added. |
The text was updated successfully, but these errors were encountered: