-
Notifications
You must be signed in to change notification settings - Fork 453
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
Add YAML Front Matter in HTML support (Jekyll) #261
Comments
This should already work: #169 |
I'm using v0.23.1 |
Could you paste your |
Atom Beautify - Debugging informationThe following debugging information was generated by Platform: linux VersionsAtom Version: 0.175.0 Atom Beautify Version: 0.23.1 Original file to be beautifiedOriginal File Path: Original File Grammar: HTML Original File Contents: ---
layout: default
title: Contact us
description: my description
---
<h2>Contact form</h2>
<form class="form-horizontal" method="POST" action="//formspree.io/[email protected]">
<div class="form-group">
<label for="name" class="col-sm-3 control-label">Name:</label>
<div class="col-sm-6">
<input type="text" name="name" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label for="email" class="col-sm-3 control-label">Email:</label>
<div class="col-sm-6">
<input type="email" name="_replyto" class="form-control" required="required">
</div>
</div>
<div class="form-group">
<label for="message" class="col-sm-3 control-label">Body:</label>
<div class="col-sm-8">
<textarea style="resize: none;" name="message" rows="5" class="form-control" required="required"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-3"></div>
<div class="col-sm-6">
<input class="btn btn-primary" type="submit" value="Send!">
</div>
</div>
</form> Beautification optionsEditor Options: {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false
} Config Options: {
"js": {
"break_chained_methods": true,
"eval_code": true,
"end_with_newline": true,
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"unescape_strings": false,
"wrap_line_length": 0
},
"css": {
"selector_separator_newline": true,
"newline_between_rules": true,
"preserve_newlines": true,
"indent_size": 4,
"indent_char": " "
},
"html": {
"indent_inner_html": true,
"end_with_newline": true,
"htmlbeautifier_path": "",
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"sub",
"sup",
"b",
"i",
"u"
]
},
"php": {
"cs_fixer_path": "/usr/local/bin/php-cs-fixer",
"fixers": "",
"level": ""
},
"sql": {
"indent_size": 4,
"keywords": "upper",
"identifiers": "lower",
"sqlformat_path": ""
},
"markdown": {
"pandoc_path": "",
"yaml_front_matter": true
},
"perl": {
"perltidy_path": "perltidy",
"perltidy_profile": ""
},
"python": {
"autopep8_path": "",
"max_line_length": 79,
"indent_size": 4,
"ignore": [
"E24"
]
},
"ruby": {
"rbeautify_path": ""
},
"c": {
"uncrustifyPath": "",
"configPath": ""
},
"cpp": {
"uncrustifyPath": "",
"configPath": ""
},
"objectivec": {
"uncrustifyPath": "",
"configPath": ""
},
"cs": {
"uncrustifyPath": "",
"configPath": ""
},
"d": {
"uncrustifyPath": "",
"configPath": ""
},
"java": {
"uncrustifyPath": "",
"configPath": ""
},
"pawn": {
"uncrustifyPath": "",
"configPath": ""
},
"vala": {
"uncrustifyPath": "",
"configPath": ""
}
} Home Options: {} EditorConfig Options: {} Project Options: [
{},
{},
{},
{},
{}
] LogsError logs: Not yet supported |
I am able to reproduce on my work computer. Will look into this later this weekend. Thanks. |
+1 having the same issue |
Atom Beautify will be using |
I'm still experiencing this issue... Atom Beautify v0.26.0 |
Oooh, I apologize. I must have only skimmed your issue and assumed you meant Markdown (which we do support). Totally silly on my part. This should be a new feature request. Atom Beautify only supports YAML Front Matter in Markdown files. I'll look into YAML Front Matter in HTML. Temporary: See #284 (comment) for how to disable beautification of a language. |
Should be able to reuse the code I wrote for the older Markdown YAML Front Matter support: atom-beautify/lib/langs/markdown-beautify.coffee Lines 28 to 39 in e7a9800
|
I also have this issue on |
@mvaneijgen there is currently no solution. YAML front matter is supported in Markdown however it is not, yet, in HTML. You could submit a Pull Request for this functionality and re-use my code that originally implemented YAML front matter for markdown support: atom-beautify/lib/langs/markdown-beautify.coffee Lines 28 to 39 in e7a9800
|
This would be so fantastic to have for my jekyll projects. |
Same problem here I'm building a static site with Jekyll which uses YAML front matter and Liquid templating Liquid template includes etc work fine but the YAML I spotted this after installing the Atom plugin as Jekyll gets confused and break the site not realising that this is YAML matter (as YAML is very picky) Jekyll outputs this as html instead of the webpage: --- layout: default copyright: ⓒ2016, Ian Stanley, Stereo Cats Consultants author: Ian Stanley, Stereo Cats Consultants author-website: stereocats.co.uk --- I have set the Beautify on Save OFF for HTML for now and only run it manually followed by a manual fix to the YAML header index.html BEFORElayout: default author: Ian Stanley, Stereo Cats Consultantsindex.html AFTER Beautify:--- layout: default copyright: ⓒ2016, Ian Stanley, Stereo Cats Consultants author: Ian Stanley, Stereo Cats Consultants --- Beautify debug output belowAtom Beautify - Debugging informationThe following debugging information was generated by Table Of ContentsPlatform: darwin VersionsAtom Version: 1.7.3 Atom Beautify Version: 0.29.7 Original file to be beautifiedOriginal File Path: Original File Grammar: Jekyll (HTML) Original File Language: HTML Language namespace: html Supported Beautifiers: JS Beautify, Pretty Diff Selected Beautifier: JS Beautify Original File Contents--- layout: default copyright: ⓒ2016, Ian Stanley, Stereo Cats Consultants author: Ian Stanley, Stereo Cats Consultants author-website: stereocats.co.uk ---
<div class="home">
<div class="_hero"> {% include _hero.html %} </div>
<div class="_postebola"> {% include _postebola.html %} </div>
<div class="_whatwearedoing"> {% include _whatarewedoing.html %} </div>
<div class="_whoisbehind"> {% include _whoisbehind.html %} </div>
<div class="_quotes"> {% include _quotes.html %} </div>
<div class="_eventdetails"> {% include _eventdetails.html %} </div>
<div class="_eventbooking"> {% include _eventbooking.html %} </div>
<div class="_donations"> {% include _donations.html %} </div>
<div class="_news"> {% include _news.html %} </div>
<div class="_contactus"> {% include _contactus.html %} </div>
</div> Package SettingsThe raw package settings options {
"css": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"selector_separator_newline": false,
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "JS Beautify"
},
"general": {
"_analyticsUserId": "d7eb4088-e8a2-4dbb-bea4-a77efa86ca9f",
"analytics": true,
"loggerLevel": "warn",
"beautifyEntireFileOnSave": true,
"muteUnsupportedLanguageErrors": false,
"muteAllErrors": false
},
"html": {
"beautify_on_save": true,
"indent_size": 2,
"wrap_attributes_indent_size": 2,
"indent_inner_html": false,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify"
},
"js": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "JS Beautify"
},
"markdown": {
"beautify_on_save": true,
"gfm": true,
"yaml": true,
"commonmark": false,
"disabled": false,
"default_beautifier": "Tidy Markdown"
},
"sass": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff"
},
"apex": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"arduino": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"cs": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"c": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"coffeescript": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "coffee-fmt",
"beautify_on_save": false
},
"cfml": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"cpp": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"crystal": {
"disabled": false,
"default_beautifier": "crystal",
"beautify_on_save": false
},
"csv": {
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"d": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"ejs": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 250,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"elm": {
"disabled": false,
"default_beautifier": "elm-format",
"beautify_on_save": false
},
"erb": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"erlang": {
"disabled": false,
"default_beautifier": "erl_tidy",
"beautify_on_save": false
},
"gherkin": {
"indent_size": 4,
"indent_char": " ",
"disabled": false,
"default_beautifier": "Gherkin formatter",
"beautify_on_save": false
},
"go": {
"disabled": false,
"default_beautifier": "gofmt",
"beautify_on_save": false
},
"fortran": {
"emacs_path": "",
"emacs_script_path": "",
"disabled": false,
"default_beautifier": "Fortran Beautifier",
"beautify_on_save": false
},
"handlebars": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"haskell": {
"disabled": false,
"default_beautifier": "stylish-haskell",
"beautify_on_save": false
},
"jade": {
"indent_size": 4,
"indent_char": " ",
"disabled": false,
"default_beautifier": "Pug Beautify",
"beautify_on_save": false
},
"java": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"json": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"jsx": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 0,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"latex": {
"indent_char": " ",
"indent_with_tabs": true,
"indent_preamble": false,
"always_look_for_split_braces": true,
"always_look_for_split_brackets": false,
"remove_trailing_whitespace": false,
"align_columns_in_environments": [
"tabular",
"matrix",
"bmatrix",
"pmatrix"
],
"disabled": false,
"default_beautifier": "Latex Beautify",
"beautify_on_save": false
},
"less": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"marko": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"mustache": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"objectivec": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"ocaml": {
"disabled": false,
"default_beautifier": "ocp-indent",
"beautify_on_save": false
},
"pawn": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"perl": {
"perltidy_profile": "",
"disabled": false,
"default_beautifier": "Perltidy",
"beautify_on_save": false
},
"php": {
"cs_fixer_path": "",
"fixers": "",
"level": "",
"phpcbf_path": "",
"standard": "",
"disabled": false,
"default_beautifier": "PHP-CS-Fixer",
"beautify_on_save": false
},
"puppet": {
"disabled": false,
"default_beautifier": "puppet-lint",
"beautify_on_save": false
},
"python": {
"max_line_length": 79,
"indent_size": 4,
"ignore": [
"E24"
],
"sort_imports": false,
"disabled": false,
"default_beautifier": "autopep8",
"beautify_on_save": false
},
"riot": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"ruby": {
"indent_size": 4,
"rubocop_path": "",
"indent_char": " ",
"disabled": false,
"default_beautifier": "Rubocop",
"beautify_on_save": false
},
"rust": {
"rustfmt_path": "",
"disabled": false,
"default_beautifier": "rustfmt",
"beautify_on_save": false
},
"scss": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"spacebars": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"sql": {
"indent_size": 4,
"keywords": "upper",
"identifiers": "unchanged",
"disabled": false,
"default_beautifier": "sqlformat",
"beautify_on_save": false
},
"svg": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"swig": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"tss": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"twig": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 250,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"typescript": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "TypeScript Formatter",
"beautify_on_save": false
},
"vala": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"visualforce": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"xml": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"xtemplate": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
}
} Beautification optionsEditor Options: {
"_default": {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false
}
} Config Options: {
"apex": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"arduino": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"cs": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"c": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"coffeescript": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "coffee-fmt",
"beautify_on_save": false
},
"cfml": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"cpp": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"crystal": {
"disabled": false,
"default_beautifier": "crystal",
"beautify_on_save": false
},
"css": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"selector_separator_newline": false,
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "JS Beautify"
},
"csv": {
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"d": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"ejs": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 250,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"elm": {
"disabled": false,
"default_beautifier": "elm-format",
"beautify_on_save": false
},
"erb": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"erlang": {
"disabled": false,
"default_beautifier": "erl_tidy",
"beautify_on_save": false
},
"gherkin": {
"indent_size": 4,
"indent_char": " ",
"disabled": false,
"default_beautifier": "Gherkin formatter",
"beautify_on_save": false
},
"go": {
"disabled": false,
"default_beautifier": "gofmt",
"beautify_on_save": false
},
"fortran": {
"emacs_path": "",
"emacs_script_path": "",
"disabled": false,
"default_beautifier": "Fortran Beautifier",
"beautify_on_save": false
},
"handlebars": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"haskell": {
"disabled": false,
"default_beautifier": "stylish-haskell",
"beautify_on_save": false
},
"html": {
"beautify_on_save": true,
"indent_size": 2,
"wrap_attributes_indent_size": 2,
"indent_inner_html": false,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify"
},
"jade": {
"indent_size": 4,
"indent_char": " ",
"disabled": false,
"default_beautifier": "Pug Beautify",
"beautify_on_save": false
},
"java": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"js": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "JS Beautify"
},
"json": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"jsx": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 0,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"latex": {
"indent_char": " ",
"indent_with_tabs": true,
"indent_preamble": false,
"always_look_for_split_braces": true,
"always_look_for_split_brackets": false,
"remove_trailing_whitespace": false,
"align_columns_in_environments": [
"tabular",
"matrix",
"bmatrix",
"pmatrix"
],
"disabled": false,
"default_beautifier": "Latex Beautify",
"beautify_on_save": false
},
"less": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"markdown": {
"beautify_on_save": true,
"gfm": true,
"yaml": true,
"commonmark": false,
"disabled": false,
"default_beautifier": "Tidy Markdown"
},
"marko": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"mustache": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify",
"beautify_on_save": false
},
"objectivec": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"ocaml": {
"disabled": false,
"default_beautifier": "ocp-indent",
"beautify_on_save": false
},
"pawn": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"perl": {
"perltidy_profile": "",
"disabled": false,
"default_beautifier": "Perltidy",
"beautify_on_save": false
},
"php": {
"cs_fixer_path": "",
"fixers": "",
"level": "",
"phpcbf_path": "",
"standard": "",
"disabled": false,
"default_beautifier": "PHP-CS-Fixer",
"beautify_on_save": false
},
"puppet": {
"disabled": false,
"default_beautifier": "puppet-lint",
"beautify_on_save": false
},
"python": {
"max_line_length": 79,
"indent_size": 4,
"ignore": [
"E24"
],
"sort_imports": false,
"disabled": false,
"default_beautifier": "autopep8",
"beautify_on_save": false
},
"riot": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"ruby": {
"indent_size": 4,
"rubocop_path": "",
"indent_char": " ",
"disabled": false,
"default_beautifier": "Rubocop",
"beautify_on_save": false
},
"rust": {
"rustfmt_path": "",
"disabled": false,
"default_beautifier": "rustfmt",
"beautify_on_save": false
},
"sass": {
"beautify_on_save": true,
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff"
},
"scss": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"configPath": "",
"predefinedConfig": "csscomb",
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"spacebars": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"sql": {
"indent_size": 4,
"keywords": "upper",
"identifiers": "unchanged",
"disabled": false,
"default_beautifier": "sqlformat",
"beautify_on_save": false
},
"svg": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"swig": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"tss": {
"indent_size": 4,
"indent_char": " ",
"newline_between_rules": false,
"preserve_newlines": false,
"wrap_line_length": 0,
"indent_comments": true,
"force_indentation": false,
"convert_quotes": "none",
"align_assignments": false,
"no_lead_zero": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"twig": {
"indent_size": 4,
"indent_char": " ",
"indent_with_tabs": false,
"preserve_newlines": true,
"space_after_anon_function": false,
"break_chained_methods": false,
"wrap_line_length": 250,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"typescript": {
"indent_size": 4,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_in_paren": false,
"jslint_happy": false,
"space_after_anon_function": false,
"brace_style": "collapse",
"break_chained_methods": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"space_before_conditional": true,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"end_with_newline": false,
"end_with_comma": false,
"disabled": false,
"default_beautifier": "TypeScript Formatter",
"beautify_on_save": false
},
"vala": {
"configPath": "",
"disabled": false,
"default_beautifier": "Uncrustify",
"beautify_on_save": false
},
"visualforce": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"xml": {
"indent_inner_html": false,
"indent_size": 4,
"indent_char": " ",
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"wrap_attributes_indent_size": 4,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
},
"xtemplate": {
"indent_size": 4,
"indent_char": " ",
"wrap_line_length": 250,
"preserve_newlines": true,
"disabled": false,
"default_beautifier": "Pretty Diff",
"beautify_on_save": false
}
} Home Options: {
"_default": {}
} EditorConfig Options: {
"_default": {}
} Project Options: [
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
},
{
"_default": {}
}
] Pre-Transformed Options: {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false,
"beautify_on_save": true,
"wrap_attributes_indent_size": 2,
"indent_inner_html": false,
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify"
} Final OptionsFinal combined and transformed options that are used {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": false,
"beautify_on_save": true,
"wrap_attributes_indent_size": 2,
"indent_inner_html": false,
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 250,
"wrap_attributes": "auto",
"preserve_newlines": true,
"max_preserve_newlines": 10,
"unformatted": [
"a",
"span",
"img",
"bdo",
"em",
"strong",
"dfn",
"code",
"samp",
"kbd",
"var",
"cite",
"abbr",
"acronym",
"q",
"sub",
"sup",
"tt",
"i",
"b",
"big",
"small",
"u",
"s",
"strike",
"font",
"ins",
"del",
"pre",
"address",
"dt",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6"
],
"end_with_newline": false,
"extra_liners": [
"head",
"body",
"/html"
],
"disabled": false,
"default_beautifier": "JS Beautify"
} ResultsBeautified File Contents: --- layout: default copyright: ⓒ2016, Ian Stanley, Stereo Cats Consultants author: Ian Stanley, Stereo Cats Consultants author-website: stereocats.co.uk ---
<div class="home">
<div class="_hero"> {% include _hero.html %} </div>
<div class="_postebola"> {% include _postebola.html %} </div>
<div class="_whatwearedoing"> {% include _whatarewedoing.html %} </div>
<div class="_whoisbehind"> {% include _whoisbehind.html %} </div>
<div class="_quotes"> {% include _quotes.html %} </div>
<div class="_eventdetails"> {% include _eventdetails.html %} </div>
<div class="_eventbooking"> {% include _eventbooking.html %} </div>
<div class="_donations"> {% include _donations.html %} </div>
<div class="_news"> {% include _news.html %} </div>
<div class="_contactus"> {% include _contactus.html %} </div>
</div> Original vs. Beautified Diff: Index: /Users/ian/Desktop/Generational Legacy/generational-legacy/index.html
===================================================================
--- /Users/ian/Desktop/Generational Legacy/generational-legacy/index.html original
+++ /Users/ian/Desktop/Generational Legacy/generational-legacy/index.html beautified
@@ -21,5 +21,5 @@
<div class="_news"> {% include _news.html %} </div>
<div class="_contactus"> {% include _contactus.html %} </div>
-</div>
+</div>
\ No newline at end of file Logs
|
This is probably not supported by either Pretty Diff or JS Beautify. The primary problem is that |
Could we have an option to just ignore the lines between --- on the first line of the file and the next --- an then continue? An option that you have to explicitly turn on in the config? Alternatively, save out to a temporary file (an old system admin trick) everything after the YAML and beautify that the insert it back again - all under atom control Otherwise almost every static site generator's source files gets all the YAML mangled - especially Jekyll whose user base must be a high percentage of installed users (after all it is a GitHub authoring & hosting process) Don't really mind if the YAML is not beautified but I don't really want to beautify each line manually of the Jekyll _include file |
I opened an issue to provide the appropriate level of support: prettydiff/prettydiff#311 After being off line for the past 5 weeks I have opened a great many issues since yesterday. I cannot start work on these until I return home this weekend, so I will get to this as soon as I can. |
Hi! |
@Jerome-Celle The version of Pretty Diff in Atom Beautify is old. This is my fault and not the fault of Atom Beautify. I am working on a resolution. |
@prettydiff This is not a problem, I saw that a correction had been made. |
@Jerome-Celle The best bet would be to serve Front Matter as an independent language. I recommend creating a pull request with a new file frontmatter.coffee based upon https://github.com/Glavin001/atom-beautify/blob/master/src/languages/twig.coffee The code would look something like:
|
Can we had something like this in html.coffee with the other option? I have tried on http://prettydiff.com/?m=beautify with YAML Jekyll Support (jekyll) option, the result is good for me. I create the file like you propose, but I still have the same result. Maybe I need to make something else that just create the file (with the content inside)? |
After you create the new file you need to completely close out of Atom and restart it. Then see if the grammar "HTML (Jekyll)" is available. |
This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please add a comment. It will be closed if no further activity occurs. Thank you for your contributions. |
Before:
After:
The text was updated successfully, but these errors were encountered: