angular.module('multi-transclude', []).directive('ngMultiTransclude', function(){
  return {
    link: function($scope, $element, $attrs, controller, transcludeFn){
      var selector = '[name=' + $attrs.ngMultiTransclude + ']';
      
      var attach = function(clone){
        $element.html('');
        
        var $part = clone.find(selector).addBack(selector);
        if($part.length){
          $element.append($part);
        }
      };
       
      if(transcludeFn.$$element){
        attach(transcludeFn.$$element);
      }
      else {
        transcludeFn(function(clone){
          transcludeFn.$$element = clone;
          attach(clone);
        });
      }
    }
  };
});

@@ -62,16 +62,20 @@
 sclude',
+ %5B%0A 
  functio
@@ -81,16 +81,18 @@
 on()%7B%0A  
+ 
+ 
 return %7B
@@ -100,13 +100,74 @@
     
-link:
+  compile: function($element, $attrs, $transclude)%7B%0A        return
  fun
@@ -176,17 +176,15 @@
 ion(
-$
 scope, 
-$
 elem
@@ -192,17 +192,16 @@
 nt, 
-$
 attrs, c
 ontr
@@ -200,17 +200,11 @@
 s, c
-ontroller
+trl
 , tr
@@ -216,16 +216,20 @@
 udeFn)%7B%0A
+    
       va
@@ -252,17 +252,16 @@
 ame=' + 
-$
 attrs.ng
@@ -286,24 +286,118 @@
 '%5D';%0A      %0A
+          // Replace this element's HTML with the correct%0A          // part of the clone.%0A    
       var at
@@ -420,33 +420,36 @@
 clone)%7B%0A        
-$
+    
 element.html('')
@@ -454,24 +454,28 @@
 ');%0A        
+    
 %0A        var
@@ -467,24 +467,28 @@
    %0A        
+    
 var $part = 
@@ -535,16 +535,20 @@
         
+    
 if($part
@@ -567,17 +567,20 @@
         
+  
-$
+  
 element.
@@ -602,24 +602,32 @@
         
-%7D%0A
+    %7D%0A   
       
+ 
 %7D;%0A     
@@ -632,30 +632,393 @@
     
+   
 %0A      
-if(transcludeFn
+    // Only link the clone if we haven't already; store%0A          // the already-linked clone on the %60compile%60 method's%0A          // %60$transclude%60 as that function is shared by all%0A          // instances of the %60ng-multi-transclude%60 directive,%0A          // whereas %60transcludeFn%60 is not.  We can still use%0A          // %60transcludeFn%60 to link, though.%0A          if($transclude
 .$$e
@@ -1026,16 +1026,20 @@
 ement)%7B%0A
+    
         
@@ -1045,16 +1045,17 @@
  attach(
+$
 transclu
@@ -1048,34 +1048,32 @@
 tach($transclude
-Fn
 .$$element);%0A   
@@ -1071,26 +1071,34 @@
 ent);%0A      
+  
-%7D%0A
+  %7D%0A    
       else %7B
@@ -1098,32 +1098,36 @@
  else %7B%0A        
+   
+ 
 transcludeFn(fun
@@ -1142,32 +1142,37 @@
 one)%7B%0A          
+    $
 transcludeFn.$$e
@@ -1165,18 +1165,16 @@
 ansclude
-Fn
 .$$eleme
@@ -1191,24 +1191,28 @@
 ;%0A          
+  
+  
 attach(clone
@@ -1226,31 +1226,58 @@
     
-%7D);%0A      %7D%0A    %7D%0A  %7D;%0A%7D
+    %7D);%0A          %7D%0A        %7D;%0A      %7D%0A    %7D;%0A  %7D%0A%5D
 );%0A

Fix mulit-linking issue by moving cross-instance communication to compile's transclude function.