We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You can retrieve Beautifier default options using Python: opts = jsbeautifier.default_options(), not with JavaScript.
opts = jsbeautifier.default_options()
This would be useful for "complex" default options, example with beautifier.js source code for unformatted:
unformatted
// beautifier.js simplified source code for unformatted // https://github.com/beautify-web/js-beautify/blob/v1.7.5/js/src/html/beautifier.js#L93 defaultOptions.unformatted = [ 'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button', 'canvas', 'cite' // ... ];
If I want to remove (or add) some tags from the unformatted option I would like to write something like:
import { html_beautify, defaultOptions } from 'js-beautify'; const excludeButton = defaultOptions.unformatted.filter(tag => tag !== 'button'); const niceHtml = html_beautify(uglyHtml, { unformatted: excludeButton });
The text was updated successfully, but these errors were encountered:
@tkrotoff Sounds great! Go for it.
Sorry, something went wrong.
Fixed by #1568.
defaultOptions
No branches or pull requests
You can retrieve Beautifier default options using Python:
opts = jsbeautifier.default_options()
, not with JavaScript.This would be useful for "complex" default options, example with beautifier.js source code for
unformatted
:If I want to remove (or add) some tags from the unformatted option I would like to write something like:
The text was updated successfully, but these errors were encountered: