How to use the emmet/action/updateTag.getUpdatedTag function in emmet

To help you get started, we’ve selected a few emmet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emmetio / brackets-emmet / interactive.js View on Github external
update: function(abbr) {
					abbr = abbr.trim();
					var tag, replaced;
					var didUpdate = false;
					for (var i = selCtx.length - 1, ctx; i >= 0; i--) {
						ctx = selCtx[i];
						tag = null;

						if (abbr) {
							try {
								tag = updateTag.getUpdatedTag(abbr, {match: ctx.tag}, info.content, {
									counter: ctx.counter
								});
							} catch (e) {
								console.error(e);
							}
						}

						if (!tag) {
							continue;
						}

						replaced = [{
							start: ctx.tag.open.range.start, 
							end: ctx.tag.open.range.end,
							content: tag.source
						}];