function updateAttributes(tag, abbrNode, ix) {
						var classNames = (abbrNode.attribute('class') || '').split(/\s+/g);
						if (ix) {
							classNames.push('+' + abbrNode.name());
						}

						var r = function (str) {
							return utils.replaceCounter(str, abbrNode.counter);
						};

						// update class
						classNames.forEach(function (className) {
							if (!className) {
								return;
							}

							className = r(className);
							var ch = className.charAt(0);
							if (ch == '+') {
								tag.addClass(className.substr(1));
							} else if (ch == '-') {
								tag.removeClass(className.substr(1));
							} else {
								tag.value('class', className);
							}
						});

						// update attributes
						abbrNode.attributeList().forEach(function (attr) {
							if (attr.name.toLowerCase() == 'class') {
								return;
							}

							var ch = attr.name.charAt(0);
							if (ch == '+') {
								var attrName = attr.name.substr(1);
								var tagAttr = tag.get(attrName);
								if (tagAttr) {
									tagAttr.value(tagAttr.value() + r(attr.value));
								} else {
									tag.value(attrName, r(attr.value));
								}
							} else if (ch == '-') {
								tag.remove(attr.name.substr(1));
							} else {
								tag.value(attr.name, r(attr.value));
							}
						});
					}
Update Tag action: allows users to update existing HTML tags and add/remove
attributes or even tag name