 					classes.append name
 		return
 
+	getTextObject: ->
+		if @item.$? and 'text' of @item.$
+			@item.$
+		else if 'text' of @item
+			@item
+		else if @item.label? and 'text' of @item.label
+			@item.label
+
 	updateText: ->
-		if @item.$? and 'text' of @item.$
-			obj = @item.$
-		else if 'text' of @item
-			obj = @item
-		else if @item.label? and 'text' of @item.label
-			obj = @item.label
-
+		obj = @getTextObject()
 		node = @node
 		if node.children.length is 1 and node.children[0].name is 'a'
 			node = node.children[0]
 			href = node.attrs.get('href')
 			if typeof href is 'string'
+				unless @isLinkUriSet
+					@isLinkUriSet = true
+					@baseLinkUri = @item.linkUri
 				@item.linkUri = href
 
 		if obj


		for child in @children
			child.revert()

		# revert attr values
		{setAttrs, attrValues} = @


			if text.length > 0 or @isTextSet
				@isTextSet = true
				@baseText = obj.text
				obj.text = text
		return

