http://jsbeautifier.org/๋ฅผ ์ฝ๋ ๋ค.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
</body>
</html>
๋ด๊ฐ ์ป์ ๊ฒ์ :
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"
integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4"
crossorigin="anonymous"></script>
</body>
</html>
์ด ์ํ์์๋ 100์๋ฅผ ์ด๊ณผํ๋ ์ค์ด ์์ ๊ฒ์ผ๋ก ์์ํ์ง๋ง 100 ์ด ๋๊ธ์๋ฅผ ๋์ถ์ํค๋ ์ฌ๋ฌ ์ค์ด ์๋๋ฐ, ์ด๋ ๋ชจ๋ ๋ฌธ์ ๊ฐ๋๋ ์ค์ ์์ฑ์ ๋ํํ์ฌ ํผํ ์ ์์ต๋๋ค.
๊ด๋ จ ๊ฐ๋ฅ์ฑ : beautify-web / js-beautify # 1223
์ด ๋ฌธ์ ์ ๋ํ ์ ๋ฐ์ดํธ๊ฐ ์์ต๋๊น?
์๋
ํ์ธ์.
1.8.0rc2์์ ๊ฐ์ ๋์์ง๋ง ๋ ๋ง์ ๋์์ด ํ์ํฉ๋๋ค. PR์ ์ ์ถํ์ญ์์ค.
ํ
์์๋๋ ์ถ๋ ฅ์ ์ ๊ณตํ๋ ํด๋ผ์ฐ๋?
ํนํ ์ฒซ ๋ฒ์งธ ์์ฑ์ด ๋๋ฌด ๊ธธ์ด์ ๋ํ ํ ๋ ์ด๋ค ์ผ์ด ๋ฐ์ํ ๊ฒ์ผ๋ก ์์ ํ์ต๋๊น?
ํด๋น ์์ฑ์ด ๋๋ฌด ๊ธธ์ด์ ๋ํ (์ด๋ฆ = "๊ฐ"์ ํจ๊ป ์ ์ง)ํ๋ฉด ์ฌ์ ํ ๋๊ธ์๋ฅผ ๋์ด์๋ ์ถ๋ ฅ์ด ์์ฑ๋๋ ๊ฒฝ์ฐ์๋ ์ด๋จ๊น์?
์ด ๋์์ ํฌ๊ฒ ๊ฐ์ ํ์ง๋ง ์ฌ๋ฐ๋ฅธ ๊ฒฐ๊ณผ๊ฐ ๋ฌด์์ธ์ง์ ๋ํ ๊ทํ์ ์๊ฒฌ์ ๋ถํ๋๋ฆฝ๋๋ค.
๋๋ ๋ค์๊ณผ ๊ฐ์ ๊ฒ์ ๊ธฐ๋ํฉ๋๋ค.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"
integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy"
crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"
integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4"
crossorigin="anonymous"></script>
</body>
</html>
Run "Beautify"
What I got is:
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"
integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy"
crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"
integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4"
crossorigin="anonymous"></script>
</body>
</html>
name="value"
์ ์ ์งํ๊ณ ์ค ๊ธธ์ด๋ฅผ ์ด๊ณผํ๋ฉด ๊ทธ๋ ๊ฒํ์ธ์ ...
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ๋ค์๊ณผ ๊ฐ์ ๊ฒ์ ๊ธฐ๋ํฉ๋๋ค.
name="value"
์ ์ ์งํ๊ณ ์ค ๊ธธ์ด๋ฅผ ์ด๊ณผํ๋ฉด ๊ทธ๋ ๊ฒํ์ธ์ ...