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
Normalize Whitespace Plugin: add configuration via attributes #3467
Normalize Whitespace Plugin: add configuration via attributes #3467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @plasticrake!
I think the idea is good, but we need to improve the implementation a little.
// value, settingType assert(t('', 'boolean') === true); assert(t('true', 'boolean') === true); assert(t('false', 'boolean') === false); assert(t('invalid', 'boolean') === undefined); assert(t('', 'number') === undefined); assert(t('0', 'number') === 0); assert(t('123', 'number') === 123); assert(t('invalid', 'number') === undefined); assert(t('123invalid456', 'number') === undefined);
It is more strict parsing data-props. If a value is unexpected it is ignored. Boolean props set with
|
Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
Thank you for contributing @plasticrake! |
Added the ability to set configuration using
data-
attributes. Previously you could only set them via page-wide defaults.It appeared there was some unused code with
env.settings
left over from PR #851. But without that PR/plugin you cannot set anything at the block-level.Original Plugin Author: @zeitgeist87