@@ -983,12 +983,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
983
983
j < jj ;
984
984
j ++
985
985
) {
986
- /** @type {string|boolean } */
987
- let attrStartName = false ;
988
-
989
- /** @type {string|boolean } */
990
- let attrEndName = false ;
991
-
992
986
let isNgAttr = false ;
993
987
let isNgProp = false ;
994
988
let isNgEvent = false ;
@@ -1055,8 +1049,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1055
1049
"A" ,
1056
1050
maxPriority ,
1057
1051
ignoreDirective ,
1058
- attrStartName ,
1059
- attrEndName ,
1060
1052
) ;
1061
1053
}
1062
1054
}
@@ -1082,62 +1074,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1082
1074
return directives ;
1083
1075
}
1084
1076
1085
- /**
1086
- * Given a node with a directive-start it collects all of the siblings until it finds
1087
- * directive-end.
1088
- * @param {Element } node
1089
- * @param {string } attrStart
1090
- * @param {string } attrEnd
1091
- * @returns {* }
1092
- */
1093
- function groupScan ( node , attrStart , attrEnd ) {
1094
- const nodes = [ ] ;
1095
- let depth = 0 ;
1096
- if ( attrStart && node . hasAttribute && node . hasAttribute ( attrStart ) ) {
1097
- do {
1098
- if ( ! node ) {
1099
- throw $compileMinErr (
1100
- "uterdir" ,
1101
- "Unterminated attribute, found '{0}' but no matching '{1}' found." ,
1102
- attrStart ,
1103
- attrEnd ,
1104
- ) ;
1105
- }
1106
- if ( node . nodeType === Node . ELEMENT_NODE ) {
1107
- if ( node . hasAttribute ( attrStart ) ) depth ++ ;
1108
- if ( node . hasAttribute ( attrEnd ) ) depth -- ;
1109
- }
1110
- nodes . push ( node ) ;
1111
- node = /** @type {Element } */ ( node . nextSibling ) ;
1112
- } while ( depth > 0 ) ;
1113
- } else {
1114
- nodes . push ( node ) ;
1115
- }
1116
-
1117
- return JQLite ( nodes ) ;
1118
- }
1119
-
1120
- /**
1121
- * Wrapper for linking function which converts normal linking function into a grouped
1122
- * linking function.
1123
- * @param linkFn
1124
- * @param attrStart
1125
- * @param attrEnd
1126
- * @returns {Function }
1127
- */
1128
- function groupElementsLinkFnWrapper ( linkFn , attrStart , attrEnd ) {
1129
- return function groupedElementsLink (
1130
- scope ,
1131
- element ,
1132
- attrs ,
1133
- controllers ,
1134
- transcludeFn ,
1135
- ) {
1136
- element = groupScan ( element [ 0 ] , attrStart , attrEnd ) ;
1137
- return linkFn ( scope , element , attrs , controllers , transcludeFn ) ;
1138
- } ;
1139
- }
1140
-
1141
1077
/**
1142
1078
* A function generator that is used to support both eager and lazy compilation
1143
1079
* linking function.
@@ -1529,17 +1465,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1529
1465
// executes all directives on the current element
1530
1466
for ( let i = 0 , ii = directives . length ; i < ii ; i ++ ) {
1531
1467
directive = directives [ i ] ;
1532
- const attrStart = directive . $$start ;
1533
- const attrEnd = directive . $$end ;
1534
-
1535
- // collect multiblock sections
1536
- if ( attrStart ) {
1537
- $compileNode = groupScan (
1538
- /** @type {Element } */ ( compileNode ) ,
1539
- attrStart ,
1540
- attrEnd ,
1541
- ) ;
1542
- }
1543
1468
$template = undefined ;
1544
1469
1545
1470
if ( terminalPriority > directive . priority ) {
@@ -1887,13 +1812,11 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1887
1812
) ;
1888
1813
const context = directive . $$originalDirective || directive ;
1889
1814
if ( isFunction ( linkFn ) ) {
1890
- addLinkFns ( null , bind ( context , linkFn ) , attrStart , attrEnd ) ;
1815
+ addLinkFns ( null , bind ( context , linkFn ) ) ;
1891
1816
} else if ( linkFn ) {
1892
1817
addLinkFns (
1893
1818
bind ( context , linkFn . pre ) ,
1894
1819
bind ( context , linkFn . post ) ,
1895
- attrStart ,
1896
- attrEnd ,
1897
1820
) ;
1898
1821
}
1899
1822
} catch ( e ) {
@@ -1921,10 +1844,8 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1921
1844
1922
1845
/// /////////////////
1923
1846
1924
- function addLinkFns ( pre , post , attrStart , attrEnd ) {
1847
+ function addLinkFns ( pre , post ) {
1925
1848
if ( pre ) {
1926
- if ( attrStart )
1927
- pre = groupElementsLinkFnWrapper ( pre , attrStart , attrEnd ) ;
1928
1849
pre . require = directive . require ;
1929
1850
pre . directiveName = directiveName ;
1930
1851
if (
@@ -1936,8 +1857,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
1936
1857
preLinkFns . push ( pre ) ;
1937
1858
}
1938
1859
if ( post ) {
1939
- if ( attrStart )
1940
- post = groupElementsLinkFnWrapper ( post , attrStart , attrEnd ) ;
1941
1860
post . require = directive . require ;
1942
1861
post . directiveName = directiveName ;
1943
1862
if (
@@ -2106,8 +2025,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2106
2025
location ,
2107
2026
maxPriority ,
2108
2027
ignoreDirective ,
2109
- startAttrName ,
2110
- endAttrName ,
2111
2028
) {
2112
2029
if ( name === ignoreDirective ) return false ;
2113
2030
let match = false ;
@@ -2125,12 +2042,6 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
2125
2042
( isUndefined ( maxPriority ) || maxPriority > directive . priority ) &&
2126
2043
directive . restrict . indexOf ( location ) !== - 1
2127
2044
) {
2128
- if ( startAttrName ) {
2129
- directive = inherit ( directive , {
2130
- $$start : startAttrName ,
2131
- $$end : endAttrName ,
2132
- } ) ;
2133
- }
2134
2045
if ( ! directive . $$bindings ) {
2135
2046
const bindings = ( directive . $$bindings = parseDirectiveBindings (
2136
2047
directive ,
0 commit comments