Max Preserve Newlines
Config Key: max_preserve_newlines
Description: Number of line-breaks to be preserved in one chunk
Available since version: 0.7.0 (Current: )
Type: integer
Default: 10
Support
Languages: C#, CSS, ColdFusion, EJS, HTML, HTML+ERB, Handlebars, JSON, JSON5, JSX, Java, JavaScript, Less, Liquid, Mustache, Riot, SCSS, SVG, Spacebars, Swig, Titanium Style Sheets, Twig, TypeScript, Visualforce, XML, XTemplate
Beautifiers: JS-Beautify, Pretty Diff
Comparison Table
Language | JS-Beautify | Pretty Diff |
---|---|---|
C# | ❌ | ✅ |
CSS | ❌ | ✅ |
ColdFusion | ❌ | ✅ |
EJS | ✅ | ✅ |
HTML | ✅ | ✅ |
HTML+ERB | ❌ | ✅ |
Handlebars | ✅ | ✅ |
JSON | ❌ | ✅ |
JSON5 | ❌ | ✅ |
JSX | ✅ | ✅ |
Java | ❌ | ✅ |
JavaScript | ✅ | ✅ |
Less | ❌ | ✅ |
Liquid | ✅ | ❌ |
Mustache | ✅ | ❌ |
Riot | ❌ | ✅ |
SCSS | ❌ | ✅ |
SVG | ❌ | ✅ |
Spacebars | ❌ | ✅ |
Swig | ❌ | ✅ |
Titanium Style Sheets | ❌ | ✅ |
Twig | ❌ | ✅ |
TypeScript | ❌ | ✅ |
Visualforce | ❌ | ✅ |
XML | ✅ | ✅ |
XTemplate | ❌ | ✅ |
Examples
Carriage Return = ␍; Line Feed = ␊; Tab = ⇥; Whitespace = ·.
🚧 Original Code
using·System;␊
␊
class·Program␊
{␊
␊
␊
␊
␊
␊
␊
␊
static·void·Main()␊
{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
Console.WriteLine("Hello,·world!");␊
␊
}␊
}␊
🔧 0
Using Pretty Diff beautifier:
using·System;␊
class·Program·{␊
··static·void·Main()·{␊
····Console.WriteLine("Hello,·world!");␊
··}␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"C#": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,34 +1,6 @@
using·System;␊
-␊
-class·Program␊
-{␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-static·void·Main()␊
-{␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-Console.WriteLine("Hello,·world!");␊
-␊
-}␊
-}␊
+class·Program·{␊
+··static·void·Main()·{␊
+····Console.WriteLine("Hello,·world!");␊
+··}␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
using·System;␊
␊
class·Program·{␊
␊
␊
␊
␊
␊
··static·void·Main()·{␊
␊
␊
␊
␊
␊
····Console.WriteLine("Hello,·world!");␊
␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"C#": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,34 +1,18 @@
using·System;␊
␊
-class·Program␊
-{␊
+class·Program·{␊
␊
␊
␊
␊
␊
+··static·void·Main()·{␊
␊
␊
-static·void·Main()␊
-{␊
␊
␊
␊
+····Console.WriteLine("Hello,·world!");␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-Console.WriteLine("Hello,·world!");␊
-␊
+··}␊
}␊
-}␊
🔧 10
Using Pretty Diff beautifier:
using·System;␊
␊
class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
··static·void·Main()·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····Console.WriteLine("Hello,·world!");␊
␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"C#": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,17 +1,15 @@
using·System;␊
␊
-class·Program␊
-{␊
+class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
-static·void·Main()␊
-{␊
+··static·void·Main()·{␊
␊
␊
␊
␊
@@ -20,15 +18,8 @@
␊
␊
␊
␊
+····Console.WriteLine("Hello,·world!");␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-Console.WriteLine("Hello,·world!");␊
-␊
+··}␊
}␊
-}␊
🔧 15
Using Pretty Diff beautifier:
using·System;␊
␊
class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
··static·void·Main()·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····Console.WriteLine("Hello,·world!");␊
␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"C#": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,17 +1,15 @@
using·System;␊
␊
-class·Program␊
-{␊
+class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
-static·void·Main()␊
-{␊
+··static·void·Main()·{␊
␊
␊
␊
␊
@@ -25,10 +23,8 @@
␊
␊
␊
␊
+····Console.WriteLine("Hello,·world!");␊
␊
-␊
-Console.WriteLine("Hello,·world!");␊
-␊
+··}␊
}␊
-}␊
🔧 20
Using Pretty Diff beautifier:
using·System;␊
␊
class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
··static·void·Main()·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····Console.WriteLine("Hello,·world!");␊
␊
··}␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"C#": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,17 +1,15 @@
using·System;␊
␊
-class·Program␊
-{␊
+class·Program·{␊
␊
␊
␊
␊
␊
␊
␊
-static·void·Main()␊
-{␊
+··static·void·Main()·{␊
␊
␊
␊
␊
@@ -27,8 +25,8 @@
␊
␊
␊
␊
-Console.WriteLine("Hello,·world!");␊
+····Console.WriteLine("Hello,·world!");␊
␊
+··}␊
}␊
-}␊
🚧 Original Code
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
.class1·{␊
··background-color:·red;␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,22 +1,3 @@
-␊
.class1·{␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
-␊
-␊
-␊
-}␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -4,18 +4,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 10
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -9,13 +9,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 15
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
🔧 20
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"CSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
🚧 Original Code
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
␊
␊
␊
␊
␊
␊
␊
<cfset·this.sessionManagement·=·true>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
<cfset·this.clientmanagement·=·true>␊
<cfset·this.name·=·"Name·of·your·application">␊
🔧 0
Using Pretty Diff beautifier:
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
<·cfset·this.sessionManagement·=·true·>␊
//·Start·client·management.·Used·to·track·client·variables␊
<cfset·this.clientmanagement=true>␊
<cfset·this.name="Name·of·your·application">
How to configure
A .unibeautify.json
file would look like the following:
{
"ColdFusion": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,32 +1,6 @@
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<cfset·this.sessionManagement·=·true>␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
+<·cfset·this.sessionManagement·=·true·>␊
//·Start·client·management.·Used·to·track·client·variables␊
-␊
-␊
-␊
-<cfset·this.clientmanagement·=·true>␊
-<cfset·this.name·=·"Name·of·your·application">␊
+<cfset·this.clientmanagement=true>␊
+<cfset·this.name="Name·of·your·application">
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
␊
␊
␊
␊
␊
<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
<cfset·this.clientmanagement=true>␊
<cfset·this.name="Name·of·your·application">
How to configure
A .unibeautify.json
file would look like the following:
{
"ColdFusion": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -4,29 +4,16 @@
␊
␊
␊
␊
+<·cfset·this.sessionManagement·=·true·>␊
␊
␊
-<cfset·this.sessionManagement·=·true>␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
-<cfset·this.clientmanagement·=·true>␊
-<cfset·this.name·=·"Name·of·your·application">␊
+<cfset·this.clientmanagement=true>␊
+<cfset·this.name="Name·of·your·application">
\ No newline at end of file
🔧 10
Using Pretty Diff beautifier:
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
␊
␊
␊
␊
␊
␊
␊
<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
<cfset·this.clientmanagement=true>␊
<cfset·this.name="Name·of·your·application">
How to configure
A .unibeautify.json
file would look like the following:
{
"ColdFusion": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -6,9 +6,9 @@
␊
␊
␊
␊
-<cfset·this.sessionManagement·=·true>␊
+<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
@@ -17,16 +17,10 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
-<cfset·this.clientmanagement·=·true>␊
-<cfset·this.name·=·"Name·of·your·application">␊
+<cfset·this.clientmanagement=true>␊
+<cfset·this.name="Name·of·your·application">
\ No newline at end of file
🔧 15
Using Pretty Diff beautifier:
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
␊
␊
␊
␊
␊
␊
␊
<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
<cfset·this.clientmanagement=true>␊
<cfset·this.name="Name·of·your·application">
How to configure
A .unibeautify.json
file would look like the following:
{
"ColdFusion": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -6,9 +6,9 @@
␊
␊
␊
␊
-<cfset·this.sessionManagement·=·true>␊
+<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
@@ -22,11 +22,10 @@
␊
␊
␊
␊
-␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
-<cfset·this.clientmanagement·=·true>␊
-<cfset·this.name·=·"Name·of·your·application">␊
+<cfset·this.clientmanagement=true>␊
+<cfset·this.name="Name·of·your·application">
\ No newline at end of file
🔧 20
Using Pretty Diff beautifier:
//·Any·variable·set·here·can·be·used·by·all·pages␊
//·Start·session·management.·Used·to·track·session·variables␊
␊
␊
␊
␊
␊
␊
␊
<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
<cfset·this.clientmanagement=true>␊
<cfset·this.name="Name·of·your·application">
How to configure
A .unibeautify.json
file would look like the following:
{
"ColdFusion": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -6,9 +6,9 @@
␊
␊
␊
␊
-<cfset·this.sessionManagement·=·true>␊
+<·cfset·this.sessionManagement·=·true·>␊
␊
␊
␊
␊
@@ -27,6 +27,6 @@
//·Start·client·management.·Used·to·track·client·variables␊
␊
␊
␊
-<cfset·this.clientmanagement·=·true>␊
-<cfset·this.name·=·"Name·of·your·application">␊
+<cfset·this.clientmanagement=true>␊
+<cfset·this.name="Name·of·your·application">
\ No newline at end of file
No example found. Please submit a Pull Request!
🚧 Original Code
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
<script>␊
␊
␊
console.log("hello·world");␊
␊
␊
</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
🔧 0
Using JS-Beautify beautifier:
<html>␊
␊
<body>␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
</body>␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,42 +1,9 @@
<html>␊
␊
-␊
-␊
<body>␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
</body>␊
␊
-␊
-␊
</html>
\ No newline at end of file
🔧 5
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -7,35 +7,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 10
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -12,30 +12,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 15
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -17,25 +17,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 20
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -22,20 +22,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🚧 Original Code
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
<script>␊
␊
␊
console.log("hello·world");␊
␊
␊
</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
🔧 0
Using Pretty Diff beautifier:
<html>␊
··<body>␊
····<script>␊
······console.log("hello·world");␊
····</script>␊
··</body>␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML+ERB": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,42 +1,7 @@
<html>␊
-␊
-␊
-␊
-<body>␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
-</body>␊
-␊
-␊
-␊
+··<body>␊
+····<script>␊
+······console.log("hello·world");␊
+····</script>␊
+··</body>␊
</html>
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
<html>␊
␊
␊
␊
··<body>␊
␊
␊
␊
␊
␊
····<script>␊
␊
␊
······console.log("hello·world");␊
····</script>␊
␊
␊
··</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML+ERB": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,42 +1,22 @@
<html>␊
␊
␊
␊
-<body>␊
+··<body>␊
␊
␊
␊
␊
␊
+····<script>␊
␊
␊
+······console.log("hello·world");␊
+····</script>␊
␊
␊
+··</body>␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
-</body>␊
-␊
-␊
-␊
</html>
\ No newline at end of file
🔧 10
Using Pretty Diff beautifier:
<html>␊
␊
␊
␊
··<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····<script>␊
␊
␊
······console.log("hello·world");␊
····</script>␊
␊
␊
··</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML+ERB": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,9 +1,9 @@
<html>␊
␊
␊
␊
-<body>␊
+··<body>␊
␊
␊
␊
␊
@@ -12,31 +12,16 @@
␊
␊
␊
␊
+····<script>␊
␊
␊
+······console.log("hello·world");␊
+····</script>␊
␊
␊
+··</body>␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
-</body>␊
-␊
-␊
-␊
</html>
\ No newline at end of file
🔧 15
Using Pretty Diff beautifier:
<html>␊
␊
␊
␊
··<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····<script>␊
␊
␊
······console.log("hello·world");␊
····</script>␊
␊
␊
··</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML+ERB": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,9 +1,9 @@
<html>␊
␊
␊
␊
-<body>␊
+··<body>␊
␊
␊
␊
␊
@@ -17,26 +17,16 @@
␊
␊
␊
␊
+····<script>␊
␊
␊
+······console.log("hello·world");␊
+····</script>␊
␊
␊
+··</body>␊
␊
␊
␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
-</body>␊
-␊
-␊
-␊
</html>
\ No newline at end of file
🔧 20
Using Pretty Diff beautifier:
<html>␊
␊
␊
␊
··<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····<script>␊
␊
␊
······console.log("hello·world");␊
····</script>␊
␊
␊
··</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML+ERB": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,9 +1,9 @@
<html>␊
␊
␊
␊
-<body>␊
+··<body>␊
␊
␊
␊
␊
@@ -22,21 +22,16 @@
␊
␊
␊
␊
+····<script>␊
␊
␊
+······console.log("hello·world");␊
+····</script>␊
␊
-<script>␊
␊
+··</body>␊
␊
-console.log("hello·world");␊
␊
␊
-</script>␊
-␊
-␊
-</body>␊
-␊
-␊
-␊
</html>
\ No newline at end of file
No example found. Please submit a Pull Request!
🚧 Original Code
{␊
␊
␊
····"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
{␊
··"key":·"value"␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,21 +1,3 @@
{␊
-␊
-␊
-····"key":·"value"␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-}␊
+··"key":·"value"␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,21 +1,10 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
}␊
🔧 10
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
@@ -11,11 +11,5 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
}␊
🔧 15
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
@@ -16,6 +16,5 @@
␊
␊
␊
␊
-␊
}␊
🔧 20
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
🚧 Original Code
{␊
␊
␊
····"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
{␊
··"key":·"value"␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON5": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,21 +1,3 @@
{␊
-␊
-␊
-····"key":·"value"␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-}␊
+··"key":·"value"␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON5": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,21 +1,10 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
}␊
🔧 10
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON5": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
@@ -11,11 +11,5 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
}␊
🔧 15
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON5": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
@@ -16,6 +16,5 @@
␊
␊
␊
␊
-␊
}␊
🔧 20
Using Pretty Diff beautifier:
{␊
␊
␊
··"key":·"value"␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"JSON5": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,8 +1,8 @@
{␊
␊
␊
-····"key":·"value"␊
+··"key":·"value"␊
␊
␊
␊
␊
🚧 Original Code
␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
␊
🔧 0
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 5
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,19 +1,9 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 10
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -8,12 +7,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 15
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 20
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JSX": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🚧 Original Code
public·class·HelloWorld·{␊
␊
␊
····public·static·void·main(String[]·args)·{␊
␊
␊
␊
········//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
········System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
····}␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
public·class·HelloWorld·{␊
··public·static·void·main(String[]·args)·{␊
····//·Prints·"Hello,·World"·to·the·terminal·window.␊
····System.out.println("Hello,·World");␊
··}␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"Java": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,39 +1,6 @@
public·class·HelloWorld·{␊
-␊
-␊
-····public·static·void·main(String[]·args)·{␊
-␊
-␊
-␊
-········//·Prints·"Hello,·World"·to·the·terminal·window.␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-········System.out.println("Hello,·World");␊
-␊
-␊
-␊
-␊
-␊
-····}␊
-␊
-}␊
+··public·static·void·main(String[]·args)·{␊
+····//·Prints·"Hello,·World"·to·the·terminal·window.␊
+····System.out.println("Hello,·World");␊
+··}␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
public·class·HelloWorld·{␊
␊
␊
··public·static·void·main(String[]·args)·{␊
␊
␊
␊
····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
··}␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Java": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,39 +1,22 @@
public·class·HelloWorld·{␊
␊
␊
-····public·static·void·main(String[]·args)·{␊
+··public·static·void·main(String[]·args)·{␊
␊
␊
␊
-········//·Prints·"Hello,·World"·to·the·terminal·window.␊
+····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
+····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
+··}␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-········System.out.println("Hello,·World");␊
-␊
-␊
-␊
-␊
-␊
-····}␊
-␊
}␊
🔧 10
Using Pretty Diff beautifier:
public·class·HelloWorld·{␊
␊
␊
··public·static·void·main(String[]·args)·{␊
␊
␊
␊
····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
··}␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Java": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,12 +1,12 @@
public·class·HelloWorld·{␊
␊
␊
-····public·static·void·main(String[]·args)·{␊
+··public·static·void·main(String[]·args)·{␊
␊
␊
␊
-········//·Prints·"Hello,·World"·to·the·terminal·window.␊
+····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
@@ -15,25 +15,13 @@
␊
␊
␊
␊
+····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
+··}␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-········System.out.println("Hello,·World");␊
-␊
-␊
-␊
-␊
-␊
-····}␊
-␊
}␊
🔧 15
Using Pretty Diff beautifier:
public·class·HelloWorld·{␊
␊
␊
··public·static·void·main(String[]·args)·{␊
␊
␊
␊
····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
··}␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Java": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,12 +1,12 @@
public·class·HelloWorld·{␊
␊
␊
-····public·static·void·main(String[]·args)·{␊
+··public·static·void·main(String[]·args)·{␊
␊
␊
␊
-········//·Prints·"Hello,·World"·to·the·terminal·window.␊
+····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
@@ -20,20 +20,13 @@
␊
␊
␊
␊
+····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
+··}␊
␊
-␊
-········System.out.println("Hello,·World");␊
-␊
-␊
-␊
-␊
-␊
-····}␊
-␊
}␊
🔧 20
Using Pretty Diff beautifier:
public·class·HelloWorld·{␊
␊
␊
··public·static·void·main(String[]·args)·{␊
␊
␊
␊
····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
····System.out.println("Hello,·World");␊
␊
␊
␊
␊
␊
··}␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Java": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,12 +1,12 @@
public·class·HelloWorld·{␊
␊
␊
-····public·static·void·main(String[]·args)·{␊
+··public·static·void·main(String[]·args)·{␊
␊
␊
␊
-········//·Prints·"Hello,·World"·to·the·terminal·window.␊
+····//·Prints·"Hello,·World"·to·the·terminal·window.␊
␊
␊
␊
␊
@@ -25,15 +25,13 @@
␊
␊
␊
␊
+····System.out.println("Hello,·World");␊
␊
␊
-········System.out.println("Hello,·World");␊
␊
␊
␊
+··}␊
␊
-␊
-····}␊
-␊
}␊
🚧 Original Code
␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
␊
🔧 0
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 5
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,19 +1,9 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 10
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -8,12 +7,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 15
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 20
Using JS-Beautify beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"JavaScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -14,6 +13,5 @@
␊
console.log("preserve_newlines2");␊
␊
␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🚧 Original Code
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
.class1·{␊
··background-color:·red;␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"Less": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,22 +1,3 @@
-␊
.class1·{␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
-␊
-␊
-␊
-}␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -4,18 +4,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 10
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -9,13 +9,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 15
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
🔧 20
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"Less": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
🚧 Original Code
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
🔧 0
Using Pretty Diff beautifier:
.class1·{␊
··background-color:·red;␊
}
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,22 +1,3 @@
-␊
.class1·{␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
-␊
-␊
-␊
-}␊
+}
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -4,18 +4,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 10
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -9,13 +9,8 @@
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
··background-color:·red;␊
␊
␊
␊
🔧 15
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
🔧 20
Using Pretty Diff beautifier:
␊
.class1·{␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··background-color:·red;␊
␊
␊
␊
}␊
How to configure
A .unibeautify.json
file would look like the following:
{
"SCSS": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
No example found. Please submit a Pull Request!
🚧 Original Code
␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
␊
🔧 0
Using Pretty Diff beautifier:
console.log("preserve_newlines1");␊
console.log("preserve_newlines2");␊
console.log("preserve_newlines3");
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,19 +1,3 @@
-␊
console.log("preserve_newlines1");␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
-␊
-␊
-console.log("preserve_newlines3");␊
-␊
+console.log("preserve_newlines3");
\ No newline at end of file
🔧 5
Using Pretty Diff beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -1,19 +1,10 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
-␊
🔧 10
Using Pretty Diff beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -9,11 +8,8 @@
␊
␊
␊
␊
-␊
-␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
-␊
🔧 15
Using Pretty Diff beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -15,5 +14,4 @@
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
-␊
🔧 20
Using Pretty Diff beautifier:
console.log("preserve_newlines1");␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
How to configure
A .unibeautify.json
file would look like the following:
{
"TypeScript": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"Pretty Diff"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -1,5 +1,4 @@
-␊
console.log("preserve_newlines1");␊
␊
␊
␊
@@ -15,5 +14,4 @@
console.log("preserve_newlines2");␊
␊
␊
console.log("preserve_newlines3");␊
-␊
No example found. Please submit a Pull Request!
🚧 Original Code
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
<script>␊
␊
␊
console.log("hello·world");␊
␊
␊
</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
🔧 0
Using JS-Beautify beautifier:
<html>␊
␊
<body>␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
</body>␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"XML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 0,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 0
===================================================================
--- 0 Original
+++ 0 Beautified
@@ -1,42 +1,9 @@
<html>␊
␊
-␊
-␊
<body>␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
</body>␊
␊
-␊
-␊
</html>
\ No newline at end of file
🔧 5
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"XML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 5,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 5
===================================================================
--- 5 Original
+++ 5 Beautified
@@ -7,35 +7,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 10
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"XML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 10,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 10
===================================================================
--- 10 Original
+++ 10 Beautified
@@ -12,30 +12,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 15
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"XML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 15,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 15
===================================================================
--- 15 Original
+++ 15 Beautified
@@ -17,25 +17,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-␊
-␊
-␊
-␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
🔧 20
Using JS-Beautify beautifier:
<html>␊
␊
␊
␊
<body>␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
␊
··<script>␊
····console.log("hello·world");␊
··</script>␊
␊
␊
</body>␊
␊
␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"XML": {
"indent_size": 2,
"indent_char": " ",
"max_preserve_newlines": 20,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: 20
===================================================================
--- 20 Original
+++ 20 Beautified
@@ -22,20 +22,13 @@
␊
␊
␊
␊
+··<script>␊
+····console.log("hello·world");␊
+··</script>␊
␊
␊
-␊
-<script>␊
-␊
-␊
-console.log("hello·world");␊
-␊
-␊
-</script>␊
-␊
-␊
</body>␊
␊
␊
␊
No example found. Please submit a Pull Request!