Indent Inner Html
Config Key: indent_inner_html
Description: Indent
and sections.Available since version: 0.7.0 (Current: )
Type: boolean
Default: false
Support
Languages: HTML, Handlebars, Liquid, Mustache, XML
Beautifiers: JS-Beautify
Comparison Table
Language | JS-Beautify |
---|---|
HTML | ✅ |
Handlebars | ✅ |
Liquid | ✅ |
Mustache | ✅ |
XML | ✅ |
Examples
Carriage Return = ␍; Line Feed = ␊; Tab = ⇥; Whitespace = ·.
🚧 Original Code
<html><head></head><body></body></html>
🔧 true
Using JS-Beautify beautifier:
<html>␊
␊
··<head></head>␊
␊
··<body></body>␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"indent_inner_html": true,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: true
===================================================================
--- true Original
+++ true Beautified
@@ -1,1 +1,7 @@
-<html><head></head><body></body></html>
\ No newline at end of file
+<html>␊
+␊
+··<head></head>␊
+␊
+··<body></body>␊
+␊
+</html>
\ No newline at end of file
🔧 false
Using JS-Beautify beautifier:
<html>␊
␊
<head></head>␊
␊
<body></body>␊
␊
</html>
How to configure
A .unibeautify.json
file would look like the following:
{
"HTML": {
"indent_size": 2,
"indent_char": " ",
"indent_inner_html": false,
"beautifiers": [
"JS-Beautify"
]
}
}
Difference from original
Index: false
===================================================================
--- false Original
+++ false Beautified
@@ -1,1 +1,7 @@
-<html><head></head><body></body></html>
\ No newline at end of file
+<html>␊
+␊
+<head></head>␊
+␊
+<body></body>␊
+␊
+</html>
\ No newline at end of file