Skip to content
This repository has been archived by the owner on Mar 8, 2019. It is now read-only.

fix check_attribute parser rule to only set attribute if already set #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

garrytan
Copy link

Previously, if you set a check_attribute for a given attribute, it would set that attribute even if it wasn't already set. This can clutter up the attributes of the markup quite a bit if you are trying to add custom attributes that will be validated, but you don't want them to show up on every one of those types of tags.

This fix skips validation for check_attribute if the attribute itself is not set at all.

@jspaper
Copy link

jspaper commented Jul 31, 2013

+1

@@ -231,15 +231,18 @@ wysihtml5.dom.parse = (function() {
attributes = wysihtml5.lang.object(setAttributes).clone();
}

if (checkAttributes) {
if (checkAttributes) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extra space should be removed.

@nickhoffman
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants