-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
include+
and include-
properties
#1668
Comments
Thanks @alexreg. Due to the way CLI options are parsed, this might need to be implemented as:
And
|
@bitwiseman Sure. I mean, that's slightly less intuitive, but if it makes the implementation a lot easier, then sounds fair. Does the bonus feature (in either form) sound doable to you too? |
@alexreg |
Implementation would probably go in these two methods:
In If we went with the As an alternative, those methods could look for option named |
Description
I propose the addition of
include+
andinclude-
properties in the configuration options, which respectively add and remove items from theinclude
list. At the moment, only the entire list can be replaced/redefined, which is quite unergonomic and does not compose well with presets, etc.Bonus
It would be very useful to be able to specify a function to the option that takes an HTML node object as a parameter, and returns a boolean value to specify whether the element should be beautified (or conversely, whether it should be considered inline). Returning "undefined" would fall back to the static
include
/include+
/include-
properties in options. This feature would allow you to only inline for exampleul.classA > li
elements (to use CSS notation). Adding support for such CSS/jQuery notation to the existinginclude
family of properties is an alternative solution.Input
With this new feature, I expect this configuration:
to be equivalent to:
Likewise, I expect this configuration:
to be equivalent to:
The text was updated successfully, but these errors were encountered: